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

Unified Diff: Shared/PluginUserSettings.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/PluginTypedef.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Shared/PluginUserSettings.cpp
===================================================================
--- a/Shared/PluginUserSettings.cpp
+++ b/Shared/PluginUserSettings.cpp
@@ -276,16 +276,15 @@
if (pVarResult)
{
- //TODO: How and where is this stored?
- TDomainList whiteList = settings->GetWhiteListedDomainList(true);
+ std::vector<std::string> whiteList = settings->GetWhiteListedDomainList(true);
CString sWhiteList;
- for (TDomainList::const_iterator it = whiteList.begin(); it != whiteList.end(); ++it)
+ for (int i = 0; i < whiteList.size(); i++)
{
if (!sWhiteList.IsEmpty())
{
sWhiteList += ',';
}
- sWhiteList += it->first;
+ sWhiteList += CString(CA2W(whiteList[i].c_str(), CP_UTF8));
}
pVarResult->vt = VT_BSTR;
@@ -303,10 +302,7 @@
CComBSTR domain = pDispparams->rgvarg[0].bstrVal;
if (domain.Length())
{
- if (!settings->IsWhiteListedDomain((BSTR)domain))
- {
- settings->AddWhiteListedDomain((BSTR)domain, 1, true);
- }
+ settings->AddWhiteListedDomain((BSTR)domain);
}
}
else if (s_RemoveWhitelistDomain == method)
@@ -320,7 +316,7 @@
CComBSTR domain = pDispparams->rgvarg[0].bstrVal;
if (settings->IsWhiteListedDomain((BSTR)domain))
{
- settings->AddWhiteListedDomain((BSTR)domain, 3, true);
+ settings->AddWhiteListedDomain((BSTR)domain);
CPluginClient::GetInstance()->ClearWhiteListCache();
}
}
« no previous file with comments | « Shared/PluginTypedef.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld