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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 5915004: Introduce incognito preference settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed whitespaces in mac files Created 9 years, 11 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/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index e0d342941cbdf49c93f320fd970f1d3610e040e9..229d377fb526522d9f2826ca1550e13ae84beea2 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -683,10 +683,10 @@ net::TransportSecurityState*
PrefService* ProfileImpl::GetPrefs() {
if (!prefs_.get()) {
- ExtensionPrefStore* extension_pref_store = new ExtensionPrefStore;
- prefs_.reset(PrefService::CreatePrefService(GetPrefFilePath(),
- extension_pref_store,
- GetOriginalProfile()));
+ prefs_.reset(PrefService::CreatePrefService(
+ GetPrefFilePath(),
+ new ExtensionPrefStore(GetExtensionPrefValueMap(), false),
+ GetOriginalProfile()));
// The Profile class and ProfileManager class may read some prefs so
// register known prefs as soon as possible.
@@ -707,7 +707,7 @@ PrefService* ProfileImpl::GetPrefs() {
extension_prefs_.reset(new ExtensionPrefs(
prefs_.get(),
GetPath().AppendASCII(ExtensionService::kInstallDirectoryName),
- extension_pref_store));
+ GetExtensionPrefValueMap()));
DCHECK(!net_pref_observer_.get());
net_pref_observer_.reset(new NetPrefObserver(prefs_.get()));
@@ -1196,6 +1196,12 @@ void ProfileImpl::SpellCheckHostInitialized() {
Source<Profile>(this), NotificationService::NoDetails());
}
+ExtensionPrefValueMap* ProfileImpl::GetExtensionPrefValueMap() {
+ if (!extension_pref_value_map_.get())
+ extension_pref_value_map_.reset(new ExtensionPrefValueMap);
+ return extension_pref_value_map_.get();
+}
+
WebKitContext* ProfileImpl::GetWebKitContext() {
if (!webkit_context_.get())
webkit_context_ = new WebKitContext(this, clear_local_state_on_exit_);

Powered by Google App Engine
This is Rietveld 408576698