Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: Shared/PluginConfiguration.cpp

Issue 9998007: Initial libadblockplus integration (Closed)
Patch Set: Whitelisting management Created April 11, 2013, 9:06 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Shared/PluginConfiguration.h ('k') | Shared/PluginSettings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Shared/PluginConfiguration.cpp
===================================================================
--- a/Shared/PluginConfiguration.cpp
+++ b/Shared/PluginConfiguration.cpp
@@ -68,42 +68,6 @@
httpRequest.Add("errors", settings->GetErrorList());
-#ifdef SUPPORT_WHITELIST
-
- // White list info
- CString whiteListCount;
- whiteListCount.Format(L"%d", settings->GetWhiteListedDomainCount());
-
- httpRequest.Add("wcount", whiteListCount);
-
- TDomainList whiteListToGo = settings->GetWhiteListedDomainList(true);
- TDomainList whiteListToGoSent;
-
- if (!whiteListToGo.empty())
- {
- CString whiteList;
- int count = 0;
-
- for (TDomainList::const_iterator it = whiteListToGo.begin(); it != whiteListToGo.end() && count < 5; count++, ++it)
- {
- CString whiteListReason;
- whiteListReason.Format(L",%d", it->second);
-
- if (!whiteList.IsEmpty())
- {
- whiteList += ',';
- }
- whiteList += it->first;
- whiteList += whiteListReason;
-
- whiteListToGoSent.insert(std::make_pair(it->first, it->second));
- }
-
- httpRequest.Add("wlist", whiteList);
- }
-
-#endif // SUPPORT_WHITELIST
-
httpRequest.Add("dicv", settings->GetValue(SETTING_DICTIONARY_VERSION, 0));
#ifdef SUPPORT_CONFIG
@@ -130,16 +94,6 @@
const std::auto_ptr<CPluginIniFile>& iniFile = httpRequest.GetResponseFile();
-#ifdef SUPPORT_WHITELIST
-
- // Update whitelists to go
- if (!whiteListToGoSent.empty())
- {
- settings->RemoveWhiteListedDomainsToGo(whiteListToGoSent);
- }
-
-#endif // SUPPORT_WHITELIST
-
// Unpack settings
CPluginIniFile::TSectionData settingsData = iniFile->GetSectionData("Settings");
CPluginIniFile::TSectionData::iterator it;
@@ -222,36 +176,6 @@
#endif // SUPPORT_CONFIG
-#ifdef SUPPORT_WHITELIST
-
- // Unpack whitelist domains
- m_isValidWhiteList = iniFile->HasSection("Whitelist");
- if (m_isValidWhiteList)
- {
- CPluginIniFile::TSectionData whitelist = iniFile->GetSectionData("Whitelist");
-
- int domainCount = 0;
- bool bContinue = true;
-
- m_whiteList.clear();
-
- do
- {
- CStringA domainCountStr;
- domainCountStr.Format("%d", ++domainCount);
-
- CPluginIniFile::TSectionData::iterator domainIt = whitelist.find("domain" + domainCountStr);
- CPluginIniFile::TSectionData::iterator reasonIt = whitelist.find("domain" + domainCountStr + "r");
-
- if (bContinue = (domainIt != whitelist.end() && reasonIt != whitelist.end()))
- {
- m_whiteList[CString(domainIt->second)] = atoi(reasonIt->second);
- }
-
- } while (bContinue);
- }
-
-#endif // #ifdef SUPPORT_WHITELIST
it = settingsData.find("registration");
if (it != settingsData.end())
{
@@ -404,31 +328,8 @@
}
-#ifdef SUPPORT_FILTER
-
-int CPluginConfiguration::GetFilterVersion() const
-{
- return m_filterVersion;
-}
-
-
-TFilterUrlList CPluginConfiguration::GetFilterUrlList() const
-{
- return m_filterUrlList;
-}
-
-std::map<CString, CString> CPluginConfiguration::GetFilterFileNamesList() const
-{
- return m_filterFileNameList;
-}
-#endif // SUPPORT_FILTER
-
#ifdef SUPPORT_WHITELIST
-TDomainList CPluginConfiguration::GetWhiteList() const
-{
- return m_whiteList;
-}
#endif // SUPPORT_WHITELIST
« no previous file with comments | « Shared/PluginConfiguration.h ('k') | Shared/PluginSettings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld