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

Unified Diff: src/engine/Main.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
« no previous file with comments | « no previous file | src/plugin/AdblockPlusClient.h » ('j') | src/plugin/AdblockPlusClient.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/engine/Main.cpp
===================================================================
--- a/src/engine/Main.cpp
+++ b/src/engine/Main.cpp
@@ -314,6 +314,21 @@
response << filterEngine->GetPref("enabled")->AsBool();
break;
}
+ case Communication::PROC_GET_HOST:
+ {
+ std::string url;
+ request >> url;
+ std::string host = filterEngine->GetHostFromURL(url);
+ if (host.empty())
+ {
+ response << url;
+ }
+ else
+ {
+ response << host;
+ }
+ break;
+ }
}
return response;
}
« no previous file with comments | « no previous file | src/plugin/AdblockPlusClient.h » ('j') | src/plugin/AdblockPlusClient.cpp » ('J')

Powered by Google App Engine
This is Rietveld