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

Unified Diff: extensions/common/ad_injection_constants.cc

Issue 384983003: Enabling AdInjectionBrowserTest after Activity Log refactoring. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 6 years, 5 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
Index: extensions/common/ad_injection_constants.cc
diff --git a/extensions/common/ad_injection_constants.cc b/extensions/common/ad_injection_constants.cc
deleted file mode 100644
index d2445e17214a94fe2b06d4a0a5a0473a981480bf..0000000000000000000000000000000000000000
--- a/extensions/common/ad_injection_constants.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "extensions/common/ad_injection_constants.h"
-
-#include "base/strings/string_util.h"
-
-namespace extensions {
-namespace ad_injection_constants {
-
-namespace keys {
-
-const char kType[] = "type";
-const char kChildren[] = "children";
-const char kSrc[] = "src";
-const char kHref[] = "href";
-
-} // namespace keys
-
-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
-// element.
-extern const size_t kMaximumChildrenToCheck = 10u;
-
-// The maximum depth to check when we examine a newly-added element.
-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 */);
-}
-
-} // namespace ad_injection_constants
-} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698