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

Unified Diff: src/plugin/PluginClass.cpp

Issue 5652794446970880: Rely on libadblockplus for domain extraction (Closed)
Patch Set: Use libadblockplus for domain extraction in APP as well Created April 22, 2014, 7:48 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
Index: src/plugin/PluginClass.cpp
===================================================================
--- a/src/plugin/PluginClass.cpp
+++ b/src/plugin/PluginClass.cpp
@@ -1333,11 +1333,11 @@
CString urlString = GetTab()->GetDocumentUrl();
if (client->IsWhitelistedUrl(std::wstring(urlString)))
{
- settings->RemoveWhiteListedDomain(ExtractDomain(urlString));
+ settings->RemoveWhiteListedDomain(client->GetHostFromUrl(urlString.GetString()).c_str());
}
else
{
- settings->AddWhiteListedDomain(ExtractDomain(urlString));
+ settings->AddWhiteListedDomain(client->GetHostFromUrl(urlString.GetString()).c_str());
}
GetBrowser()->Refresh();
}
@@ -1396,7 +1396,7 @@
{
ctext = dictionary->Lookup("menu", "menu-disable-on-site");
// Is domain in white list?
- ReplaceString(ctext, L"?1?", ExtractDomain(url).GetString());
+ ReplaceString(ctext, L"?1?", client->GetHostFromUrl(url.GetString()));
if (client->IsWhitelistedUrl(std::wstring(GetTab()->GetDocumentUrl())))
{
fmii.fState = MFS_CHECKED | MFS_ENABLED;

Powered by Google App Engine
This is Rietveld