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

Unified Diff: chrome/browser/extensions/extensions_ui.cc

Issue 6772022: Make <all_urls> and file:///* in permissions trigger "Allow file access" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for landing Created 9 years, 9 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/extension_service.cc ('k') | chrome/browser/extensions/user_script_master.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extensions_ui.cc
diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc
index 089b240d6bd038e0712f0765f1092c9965a86a1b..d332354111b72a43759f04f1f2eb0d4dd27162ca 100644
--- a/chrome/browser/extensions/extensions_ui.cc
+++ b/chrome/browser/extensions/extensions_ui.cc
@@ -715,20 +715,6 @@ DictionaryValue* ExtensionsDOMHandler::CreateContentScriptDetailValue(
return script_data;
}
-static bool ExtensionWantsFileAccess(const Extension* extension) {
- for (UserScriptList::const_iterator it = extension->content_scripts().begin();
- it != extension->content_scripts().end(); ++it) {
- for (UserScript::PatternList::const_iterator pattern =
- it->url_patterns().begin();
- pattern != it->url_patterns().end(); ++pattern) {
- if (pattern->MatchesScheme(chrome::kFileScheme))
- return true;
- }
- }
-
- return false;
-}
-
// Static
DictionaryValue* ExtensionsDOMHandler::CreateExtensionDetailValue(
ExtensionService* service, const Extension* extension,
@@ -754,8 +740,7 @@ DictionaryValue* ExtensionsDOMHandler::CreateExtensionDetailValue(
extension_data->SetBoolean("terminated", terminated);
extension_data->SetBoolean("enabledIncognito",
service ? service->IsIncognitoEnabled(extension) : false);
- extension_data->SetBoolean("wantsFileAccess",
- ExtensionWantsFileAccess(extension));
+ extension_data->SetBoolean("wantsFileAccess", extension->wants_file_access());
extension_data->SetBoolean("allowFileAccess",
service ? service->AllowFileAccess(extension) : false);
extension_data->SetBoolean("allow_reload",
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/user_script_master.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698