Index: chrome/browser/extensions/extension_prefs.cc |
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc |
index 121f4059f6c55ded4707d9e4597676ce89c08ebc..50e078eebeb6a192cc0a7041e34749d4f7b960d6 100644 |
--- a/chrome/browser/extensions/extension_prefs.cc |
+++ b/chrome/browser/extensions/extension_prefs.cc |
@@ -1116,6 +1116,18 @@ void ExtensionPrefs::OnExtensionInstalled( |
id, install_time, initial_state == Extension::ENABLED); |
content_settings_store_->RegisterExtension( |
id, install_time, initial_state == Extension::ENABLED); |
+ |
+ // Unpacked extensions default to allowing file access, but if that has been |
+ // overridden, don't reset the value. |
+ if (Extension::ShouldAlwaysAllowFileAccess(extension->location()) && |
+ !HasAllowFileAccessSetting(id)) { |
+ SetAllowFileAccess(id, true); |
+ } |
+ |
+ // If the extension should automatically block network startup (e.g., it uses |
+ // the webRequest API), set the preference. Otherwise clear it, in case the |
+ // extension stopped using a relevant API. |
+ SetDelaysNetworkRequests(id, extension->ImplicitlyDelaysNetworkStartup()); |
} |
void ExtensionPrefs::OnExtensionUninstalled(const std::string& extension_id, |