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

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

Issue 480133002: Only show the checkbox for all urls when the switch is on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/browser/extensions/permissions_updater.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b938f65bfd7c2620f1de9a0964c26101684b7c92..4b595d0e9831bfab10aa008739346e05f81e3114 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
@@ -285,13 +285,12 @@ base::DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue(
extension_data->Set("dependentExtensions", dependents_list);
// Extensions only want all URL access if:
- // - The feature is enabled.
+ // - The feature is enabled for the given extension.
// - The extension has access to enough urls that we can't just let it run
// on those specified in the permissions.
bool wants_all_urls =
- extension->permissions_data()->HasWithheldImpliedAllHosts() ||
- util::AllowedScriptingOnAllUrls(extension->id(),
- extension_service_->GetBrowserContext());
+ util::ScriptsMayRequireActionForExtension(extension) &&
+ extension->permissions_data()->HasWithheldImpliedAllHosts();
extension_data->SetBoolean("wantsAllUrls", wants_all_urls);
extension_data->SetBoolean(
"allowAllUrls",
« no previous file with comments | « chrome/browser/extensions/permissions_updater.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698