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

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

Issue 17298002: Allow tabCapture API to be granted for chrome:// pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « no previous file | chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/active_tab_permission_granter.cc
diff --git a/chrome/browser/extensions/active_tab_permission_granter.cc b/chrome/browser/extensions/active_tab_permission_granter.cc
index 8a766d7338b398586d427ef45f198967e765fa18..31fb2e6b40ef3a77dfa7b4c0c61b945ff0a747ae 100644
--- a/chrome/browser/extensions/active_tab_permission_granter.cc
+++ b/chrome/browser/extensions/active_tab_permission_granter.cc
@@ -48,6 +48,12 @@ void ActiveTabPermissionGranter::GrantIfRequested(const Extension* extension) {
URLPattern pattern(UserScript::ValidUserScriptSchemes());
if (pattern.Parse(web_contents()->GetURL().spec()) !=
URLPattern::PARSE_SUCCESS) {
+ // Allow tabCapture API to be granted access to chrome:// pages since it
+ // already requests all hosts permissions on extension install.
+ if (extension->HasAPIPermission(extensions::APIPermission::kTabCapture)) {
+ granted_extensions_.Insert(extension);
not at google - send to devlin 2013/06/17 18:14:13 this means that an extension with the tab capture
not at google - send to devlin 2013/06/17 18:16:09 checking it elsewhere wouldn't work either. maybe
justinlin 2013/06/17 18:22:20 Does it actually do that? I thought the injection
not at google - send to devlin 2013/06/17 18:44:45 I see; IsGranted is only used in the tab capture A
+ }
+
// Pattern parsing could fail if this is an unsupported URL e.g. chrome://.
return;
}
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698