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

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

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 | « no previous file | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_prefs.h
diff --git a/chrome/browser/extensions/extension_prefs.h b/chrome/browser/extensions/extension_prefs.h
index fe759ac693ca49f28ae154ef359b11816b306783..e791e8c840af8127f7c13339092c689513430ec6 100644
--- a/chrome/browser/extensions/extension_prefs.h
+++ b/chrome/browser/extensions/extension_prefs.h
@@ -67,12 +67,17 @@ class ExtensionPrefs : public ExtensionContentSettingsStore::Observer {
LAUNCH_DEFAULT = LAUNCH_REGULAR
};
- // Does not assume ownership of |prefs| and |incognito_prefs|.
+ // Does not assume ownership of |prefs| and |extension_pref_value_map|.
+ // Note that you must call Init() to finalize construction.
ExtensionPrefs(PrefService* prefs,
const FilePath& root_dir,
ExtensionPrefValueMap* extension_pref_value_map);
virtual ~ExtensionPrefs();
+ // If |extensions_disabled| is true, extension controlled preferences and
+ // content settings do not become effective.
+ void Init(bool extensions_disabled);
+
// Returns a copy of the Extensions prefs.
// TODO(erikkay) Remove this so that external consumers don't need to be
// aware of the internal structure of the preferences.
@@ -466,8 +471,8 @@ class ExtensionPrefs : public ExtensionContentSettingsStore::Observer {
void FixMissingPrefs(const ExtensionIdSet& extension_ids);
// Installs the persistent extension preferences into |prefs_|'s extension
- // pref store.
- void InitPrefStore();
+ // pref store. Does nothing if |extensions_disabled| is true.
+ void InitPrefStore(bool extensions_disabled);
// Migrates the permissions data in the pref store.
void MigratePermissions(const ExtensionIdSet& extension_ids);
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698