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

Unified Diff: src/plugin/PluginSettings.cpp

Issue 5081266177179648: Issue 1104 - Cannot uncheck Disable on website option in tool bar (Closed)
Patch Set: Created Feb. 23, 2015, 12:40 p.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
Index: src/plugin/PluginSettings.cpp
diff --git a/src/plugin/PluginSettings.cpp b/src/plugin/PluginSettings.cpp
index 7f880a1ba254181271f79168140112c8683e4197..25438d6c12bbc6615da5779a7bfd67d95a56fa81 100644
--- a/src/plugin/PluginSettings.cpp
+++ b/src/plugin/PluginSettings.cpp
@@ -33,14 +33,6 @@
#include <knownfolders.h>
-namespace
-{
- std::wstring CreateDomainWhitelistingFilter(const CString& domain)
- {
- return L"@@||" + ToWstring(domain) + L"^$document";
- }
-}
-
class TSettings
{
DWORD processorId;
@@ -201,16 +193,16 @@ bool CPluginSettings::ReadWhitelist(bool isDebug)
return isRead;
}
-void CPluginSettings::AddWhiteListedDomain(const CString& domain)
+void CPluginSettings::AddWhiteListedDomain(const std::wstring& url)
{
- DEBUG_SETTINGS("SettingsWhitelist::AddWhiteListedDomain domain:" + domain)
- CPluginClient::GetInstance()->AddFilter(CreateDomainWhitelistingFilter(domain));
+ DEBUG_SETTINGS("SettingsWhitelist::AddWhiteListedDomain domain:" + ToCString(url))
+ CPluginClient::GetInstance()->AddWhiteListedDomain(url);
}
-void CPluginSettings::RemoveWhiteListedDomain(const CString& domain)
+void CPluginSettings::RemoveWhiteListedDomain(const std::wstring& url)
{
- DEBUG_SETTINGS("SettingsWhitelist::RemoveWhiteListedDomain domain:" + domain)
- CPluginClient::GetInstance()->RemoveFilter(CreateDomainWhitelistingFilter(domain));
+ DEBUG_SETTINGS("SettingsWhitelist::RemoveWhiteListedDomain domain:" + ToCString(url))
+ CPluginClient::GetInstance()->RemoveWhiteListedDomain(url);
}
int CPluginSettings::GetWhiteListedDomainCount() const

Powered by Google App Engine
This is Rietveld