Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: extensions/common/ad_injection_constants.cc

Issue 270623005: Update ActivityLog detection to use previous values, hrefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/common/ad_injection_constants.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/ad_injection_constants.cc
diff --git a/extensions/common/ad_injection_constants.cc b/extensions/common/ad_injection_constants.cc
index 68ce280f42382a5fc1d96c9d50f55877d33f6fe7..d2445e17214a94fe2b06d4a0a5a0473a981480bf 100644
--- a/extensions/common/ad_injection_constants.cc
+++ b/extensions/common/ad_injection_constants.cc
@@ -20,6 +20,7 @@ const char kHref[] = "href";
const char kHtmlIframeSrcApiName[] = "HTMLIFrameElement.src";
const char kHtmlEmbedSrcApiName[] = "HTMLEmbedElement.src";
+const char kHtmlAnchorHrefApiName[] = "HTMLAnchorElement.href";
const char kAppendChildApiSuffix[] = "appendChild";
// The maximum number of children to check when we examine a newly-added
@@ -32,6 +33,7 @@ extern const size_t kMaximumDepthToCheck = 5u;
bool ApiCanInjectAds(const std::string& api) {
return api == kHtmlIframeSrcApiName ||
api == kHtmlEmbedSrcApiName ||
+ api == kHtmlAnchorHrefApiName ||
EndsWith(api, kAppendChildApiSuffix, true /* case sensitive */);
}
« no previous file with comments | « extensions/common/ad_injection_constants.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698