diff options
author | munjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-26 01:33:33 +0000 |
---|---|---|
committer | munjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-26 01:33:33 +0000 |
commit | 5bdf82f860c89902b0f48ab37145f14dd00aff15 (patch) | |
tree | 44e22ccd0e6bba17a7758db1fa5c46395750eeef /chrome | |
parent | ac9263642922463a82cb02f1ecd06c9536cc83e7 (diff) | |
download | chromium_src-5bdf82f860c89902b0f48ab37145f14dd00aff15.zip chromium_src-5bdf82f860c89902b0f48ab37145f14dd00aff15.tar.gz chromium_src-5bdf82f860c89902b0f48ab37145f14dd00aff15.tar.bz2 |
Create ProfilePersonalization in the ctor of ProfileImpl instead of lazily creating it.
Review URL: http://codereview.chromium.org/28143
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10433 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/profile.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc index 86e9d16..dd36cc7 100644 --- a/chrome/browser/profile.cc +++ b/chrome/browser/profile.cc @@ -346,6 +346,10 @@ ProfileImpl::ProfileImpl(const FilePath& path) PrefService* prefs = GetPrefs(); prefs->AddPrefObserver(prefs::kSpellCheckDictionary, this); prefs->AddPrefObserver(prefs::kEnableSpellCheck, this); +#ifdef CHROME_PERSONALIZATION + personalization_.reset( + Personalization::CreateProfilePersonalization(this)); +#endif } void ProfileImpl::InitExtensions() { @@ -830,9 +834,7 @@ void ProfileImpl::StopCreateSessionServiceTimer() { #ifdef CHROME_PERSONALIZATION ProfilePersonalization* ProfileImpl::GetProfilePersonalization() { - if (!personalization_.get()) - personalization_.reset( - Personalization::CreateProfilePersonalization(this)); + DCHECK(personalization_.get()); return personalization_.get(); } #endif |