| Index: chrome/common/extensions/extension.cc
|
| diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
|
| index 2427b8d532de81c1c3a7716c883a0ca49abbae88..d422396560b8c961661267182711df4b309f05b2 100644
|
| --- a/chrome/common/extensions/extension.cc
|
| +++ b/chrome/common/extensions/extension.cc
|
| @@ -658,9 +658,10 @@ bool Extension::LoadUserScriptHelper(const DictionaryValue* content_script,
|
| if (pattern.MatchesScheme(chrome::kFileScheme) &&
|
| !CanExecuteScriptEverywhere()) {
|
| wants_file_access_ = true;
|
| - if (!(creation_flags_ & ALLOW_FILE_ACCESS))
|
| + if (!(creation_flags_ & ALLOW_FILE_ACCESS)) {
|
| pattern.SetValidSchemes(
|
| pattern.valid_schemes() & ~URLPattern::SCHEME_FILE);
|
| + }
|
| }
|
|
|
| result->add_url_pattern(pattern);
|
| @@ -3418,9 +3419,10 @@ bool Extension::ParsePermissions(const char* key,
|
| if (pattern.MatchesScheme(chrome::kFileScheme) &&
|
| !CanExecuteScriptEverywhere()) {
|
| wants_file_access_ = true;
|
| - if (!(creation_flags_ & ALLOW_FILE_ACCESS))
|
| + if (!(creation_flags_ & ALLOW_FILE_ACCESS)) {
|
| pattern.SetValidSchemes(
|
| pattern.valid_schemes() & ~URLPattern::SCHEME_FILE);
|
| + }
|
| }
|
|
|
| host_permissions->AddPattern(pattern);
|
|
|