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

Unified Diff: chrome/renderer/resources/extensions/ad_view.js

Issue 17104003: Improvements to fatal JavaScript extension errors: (1) include the extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: channel restriction Created 7 years, 6 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 | « chrome/renderer/extensions/module_system.cc ('k') | chrome/renderer/resources/extensions/ad_view_custom.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/extensions/ad_view.js
diff --git a/chrome/renderer/resources/extensions/ad_view.js b/chrome/renderer/resources/extensions/ad_view.js
index 3d0a76ccd8b1e18ef1776c202acb85630c19b4cd..bb2929b2cb341e663dbcbb3cddc18e46c6484f02 100644
--- a/chrome/renderer/resources/extensions/ad_view.js
+++ b/chrome/renderer/resources/extensions/ad_view.js
@@ -10,17 +10,16 @@
// TODO(rpaquay): This file is currently very similar to "web_view.js". Do we
// want to refactor to extract common pieces?
-var adViewCustom = require('adViewCustom');
+var process = requireNative('process');
var watchForTag = require('tagWatcher').watchForTag;
/**
- * Define "allowCustomAdNetworks" function such that it returns "true" if the
- * "adViewCustom" module was injected. This is so that the
+ * Define "allowCustomAdNetworks" function such that the
* "kEnableAdviewSrcAttribute" flag is respected.
*/
-var allowCustomAdNetworks = (function(allow){
- return function() { return Boolean(allow); }
-})(adViewCustom ? adViewCustom.enabled : false);
+function allowCustomAdNetworks() {
+ return process.HasSwitch('enable-adview-src-attribute');
+}
/**
* List of attribute names to "blindly" sync between <adview> tag and internal
« no previous file with comments | « chrome/renderer/extensions/module_system.cc ('k') | chrome/renderer/resources/extensions/ad_view_custom.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698