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

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: addressed comments 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..52b10fd2e0be05c9d8b483fc2847af3c6cc7311b 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -227,14 +227,15 @@ std::string JoinPrefs(std::string parent, const char* child) {
ExtensionPrefs::ExtensionPrefs(
PrefService* prefs,
const FilePath& root_dir,
- ExtensionPrefValueMap* extension_pref_value_map)
+ ExtensionPrefValueMap* extension_pref_value_map,
+ bool extensions_disabled)
: prefs_(prefs),
install_directory_(root_dir),
extension_pref_value_map_(extension_pref_value_map),
content_settings_store_(new ExtensionContentSettingsStore()) {
MakePathsRelative();
- InitPrefStore();
+ InitPrefStore(extensions_disabled);
asargent_no_longer_on_chrome 2011/09/29 18:06:59 It is sort of against the style guide to be doing
battre 2011/09/29 20:37:47 I would still want to call InitPrefStore(false) to
content_settings_store_->AddObserver(this);
}
@@ -1519,7 +1520,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