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

Unified Diff: src/plugin/PluginWbPassThrough.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/PluginWbPassThrough.cpp
===================================================================
--- a/src/plugin/PluginWbPassThrough.cpp
+++ b/src/plugin/PluginWbPassThrough.cpp
@@ -150,19 +150,7 @@
HRESULT hr = pOIBindInfo->GetBindString(BINDSTRING_XDR_ORIGIN, &domainRetrieved, 1, &resLen);
if ((hr == S_OK) && domainRetrieved && (resLen > 0))
{
- boundDomain.SetString(domainRetrieved);
- // Remove protocol
- int pos = boundDomain.Find(L"://");
- if (pos > 0)
- {
- boundDomain = boundDomain.Mid(pos + 3);
- }
- // Remove port
- pos = boundDomain.Find(L":");
- if (pos > 0)
- {
- boundDomain.Left(pos);
- }
+ boundDomain = CAdblockPlusClient::GetInstance()->GetHostFromUrl(domainRetrieved).c_str();
}
}
}

Powered by Google App Engine
This is Rietveld