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

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

Issue 8060017: Ensure that --disable-extensions disables extension prefs from being enacted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Split ExtensionPrefs constructor into constructor and Init function Created 9 years, 3 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
« no previous file with comments | « chrome/browser/extensions/extension_prefs.h ('k') | chrome/browser/extensions/extension_prefs_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_prefs.cc
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index 94af184ad2ab6f425ad4f72453a40049ec94fe4c..53bb982d1fe8d032ac5927aee306d379b69da930 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -232,16 +232,19 @@ ExtensionPrefs::ExtensionPrefs(
install_directory_(root_dir),
extension_pref_value_map_(extension_pref_value_map),
content_settings_store_(new ExtensionContentSettingsStore()) {
+}
+
+ExtensionPrefs::~ExtensionPrefs() {
+}
+
+void ExtensionPrefs::Init(bool extensions_disabled) {
MakePathsRelative();
- InitPrefStore();
+ InitPrefStore(extensions_disabled);
content_settings_store_->AddObserver(this);
}
-ExtensionPrefs::~ExtensionPrefs() {
-}
-
// static
const char ExtensionPrefs::kExtensionsPref[] = "extensions.settings";
@@ -1519,7 +1522,12 @@ const DictionaryValue* ExtensionPrefs::GetExtensionControlledPrefs(
return preferences;
}
-void ExtensionPrefs::InitPrefStore() {
+void ExtensionPrefs::InitPrefStore(bool extensions_disabled) {
+ if (extensions_disabled) {
+ extension_pref_value_map_->NotifyInitializationCompleted();
+ return;
+ }
+
// When this is called, the PrefService is initialized and provides access
// to the user preferences stored in a JSON file.
ExtensionIdSet extension_ids;
« no previous file with comments | « chrome/browser/extensions/extension_prefs.h ('k') | chrome/browser/extensions/extension_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698