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

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

Issue 9374009: Install platform apps into a separate data directory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 8 years, 10 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
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,

Powered by Google App Engine
This is Rietveld 408576698