Chromium Code Reviews| 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 608eaa171c31549c8176b39df6c3d9ebb9ef7a7e..de9e7c537740a005b5c334d83f99d2e566aaa248 100644 |
| --- a/chrome/browser/extensions/active_tab_permission_granter.cc |
| +++ b/chrome/browser/extensions/active_tab_permission_granter.cc |
| @@ -47,12 +47,9 @@ void ActiveTabPermissionGranter::GrantIfRequested(const Extension* extension) { |
| // permission in the manifest. |
| if (permissions_data->HasAPIPermission(APIPermission::kActiveTab) || |
| permissions_data->HasWithheldImpliedAllHosts()) { |
| - URLPattern pattern(UserScript::ValidUserScriptSchemes()); |
| - // Pattern parsing could fail if this is an unsupported URL e.g. chrome://. |
| - if (pattern.Parse(web_contents()->GetURL().spec()) == |
| - URLPattern::PARSE_SUCCESS) { |
| - new_hosts.AddPattern(pattern); |
| - } |
| + // Origin adding could fail if this is an unsupported URL e.g. chrome://. |
|
not at google - send to devlin
2014/08/12 19:49:27
comment isn't for here (it should be inside the Ad
gpdavis
2014/08/12 21:19:55
Done.
|
| + new_hosts.AddOrigin(UserScript::ValidUserScriptSchemes(), |
| + web_contents()->GetURL().GetOrigin()); |
|
not at google - send to devlin
2014/08/12 19:49:27
cleanup: use GetVisibleURL() here.
gpdavis
2014/08/12 21:19:54
Done.
|
| new_apis.insert(APIPermission::kTab); |
| } |