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

Unified Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.cc

Issue 874683005: [Extensions] Enable the scripts-require-action feature based on all-urls pref (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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: chrome/browser/ui/webui/extensions/extension_settings_handler.cc
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
index 210867de012130b6bcbab9f3e072649490155074..52265bf216dfe015bb62abc25f15251ceb9734d6 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
@@ -340,10 +340,10 @@ base::DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue(
// - The extension has access to enough urls that we can't just let it run
// on those specified in the permissions.
not at google - send to devlin 2015/02/06 00:26:56 The comment and/or this variable name need updatin
Devlin 2015/02/06 18:58:43 Done.
bool wants_all_urls =
- util::ScriptsMayRequireActionForExtension(extension) &&
- (extension->permissions_data()->HasWithheldImpliedAllHosts() ||
- util::AllowedScriptingOnAllUrls(
- extension->id(), extension_service_->GetBrowserContext()));
+ (FeatureSwitch::scripts_require_action()->IsEnabled() &&
+ util::ScriptsMayRequireActionForExtension(
+ extension, extension->permissions_data()->active_permissions())) ||
+ extension->permissions_data()->HasWithheldImpliedAllHosts();
extension_data->SetBoolean("wantsAllUrls", wants_all_urls);
extension_data->SetBoolean(
"allowAllUrls",

Powered by Google App Engine
This is Rietveld 408576698