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

Unified Diff: src/plugin/AdblockPlusClient.cpp

Issue 5447868882092032: Issue 1793 - check whether the frame is whitelisted before injecting CSS (Closed)
Patch Set: rebase and address comments Created April 13, 2015, 7:31 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/AdblockPlusClient.cpp
diff --git a/src/plugin/AdblockPlusClient.cpp b/src/plugin/AdblockPlusClient.cpp
index ffa28bd350f29493a8b73471a72ab3551e896381..0627ad33ae5bcc9af493dc2a64ed2897dccf72af 100644
--- a/src/plugin/AdblockPlusClient.cpp
+++ b/src/plugin/AdblockPlusClient.cpp
@@ -253,16 +253,16 @@ bool CAdblockPlusClient::IsElementHidden(const std::wstring& tag, IHTMLElement*
return isHidden;
}
-bool CAdblockPlusClient::IsWhitelistedUrl(const std::wstring& url)
+bool CAdblockPlusClient::IsWhitelistedUrl(const std::wstring& url, const std::vector<std::string>& frameHierarchy)
{
- return !GetWhitelistingFilter(url).empty();
+ return !GetWhitelistingFilter(url, frameHierarchy).empty();
}
-std::string CAdblockPlusClient::GetWhitelistingFilter(const std::wstring& url)
+std::string CAdblockPlusClient::GetWhitelistingFilter(const std::wstring& url, const std::vector<std::string>& frameHierarchy)
{
DEBUG_GENERAL((L"GetWhitelistingFilter: " + url + L" start").c_str());
Communication::OutputBuffer request;
- request << Communication::PROC_GET_WHITELISTING_FITER << url;
+ request << Communication::PROC_GET_WHITELISTING_FITER << url << frameHierarchy;
Communication::InputBuffer response;
if (!CallEngine(request, response))
@@ -275,10 +275,10 @@ std::string CAdblockPlusClient::GetWhitelistingFilter(const std::wstring& url)
return filterText;
}
-bool CAdblockPlusClient::IsElemhideWhitelistedOnDomain(const std::wstring& url)
+bool CAdblockPlusClient::IsElemhideWhitelistedOnDomain(const std::wstring& url, const std::vector<std::string>& frameHierarchy)
{
Communication::OutputBuffer request;
- request << Communication::PROC_IS_ELEMHIDE_WHITELISTED_ON_URL << url;
+ request << Communication::PROC_IS_ELEMHIDE_WHITELISTED_ON_URL << url << frameHierarchy;
Communication::InputBuffer response;
if (!CallEngine(request, response))

Powered by Google App Engine
This is Rietveld