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

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

Issue 5626004: Update valid URLPattern schemes in ExtensionPrefs::GetGrantedPermissions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove kValidWebExtentSchemes from GetGrantedPermissions Created 10 years 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 | « no previous file | chrome/browser/extensions/extension_prefs_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_prefs.cc
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index 07195e42e189765006377726e936e68b8426f145..0e086ee667e8f9804e7ae87099911fe5adb6a574 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -487,10 +487,14 @@ bool ExtensionPrefs::GetGrantedPermissions(
ReadExtensionPrefStringSet(
extension_id, kPrefGrantedPermissionsHost, &host_permissions);
+ // The granted host permissions contain hosts from the manifest's
+ // "permissions" array and from the content script "matches" arrays,
+ // so the URLPattern needs to accept valid schemes from both types.
for (std::set<std::string>::iterator i = host_permissions.begin();
i != host_permissions.end(); ++i)
host_extent->AddPattern(URLPattern(
- Extension::kValidWebExtentSchemes | UserScript::kValidUserScriptSchemes,
+ Extension::kValidHostPermissionSchemes |
+ UserScript::kValidUserScriptSchemes,
*i));
return true;
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698