| 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..2f80ad7dbc287f57d2d6afc2ccd8dd4273b12119 100644
|
| --- a/chrome/browser/extensions/active_tab_permission_granter.cc
|
| +++ b/chrome/browser/extensions/active_tab_permission_granter.cc
|
| @@ -47,12 +47,8 @@ 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);
|
| - }
|
| + new_hosts.AddOrigin(UserScript::ValidUserScriptSchemes(),
|
| + web_contents()->GetVisibleURL().GetOrigin());
|
| new_apis.insert(APIPermission::kTab);
|
| }
|
|
|
|
|