diff options
-rw-r--r-- | chrome/browser/profile.cc | 14 | ||||
-rw-r--r-- | chrome/browser/profile.h | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc index 745b1a8..9ed5496 100644 --- a/chrome/browser/profile.cc +++ b/chrome/browser/profile.cc @@ -460,7 +460,7 @@ class OffTheRecordProfileImpl : public Profile, } #ifdef CHROME_PERSONALIZATION - virtual ProfilePersonalization GetProfilePersonalization() { + virtual ProfilePersonalization* GetProfilePersonalization() { return profile_->GetProfilePersonalization(); } #endif @@ -560,8 +560,7 @@ ProfileImpl::~ProfileImpl() { download_manager_ = NULL; #ifdef CHROME_PERSONALIZATION - Personalization::CleanupProfilePersonalization(personalization_); - personalization_ = NULL; + personalization_.reset(); #endif // Both HistoryService and WebDataService maintain threads for background @@ -875,9 +874,10 @@ void ProfileImpl::StopCreateSessionServiceTimer() { } #ifdef CHROME_PERSONALIZATION -ProfilePersonalization ProfileImpl::GetProfilePersonalization() { - if (!personalization_) - personalization_ = Personalization::CreateProfilePersonalization(this); - return personalization_; +ProfilePersonalization* ProfileImpl::GetProfilePersonalization() { + if (!personalization_.get()) + personalization_.reset( + Personalization::CreateProfilePersonalization(this)); + return personalization_.get(); } #endif diff --git a/chrome/browser/profile.h b/chrome/browser/profile.h index de7044e..09b0baf 100644 --- a/chrome/browser/profile.h +++ b/chrome/browser/profile.h @@ -174,7 +174,7 @@ class Profile { virtual BookmarkModel* GetBookmarkModel() = 0; #ifdef CHROME_PERSONALIZATION - virtual ProfilePersonalization GetProfilePersonalization() = 0; + virtual ProfilePersonalization* GetProfilePersonalization() = 0; #endif // Return whether 2 profiles are the same. 2 profiles are the same if they @@ -253,7 +253,7 @@ class ProfileImpl : public Profile { virtual SpellChecker* GetSpellChecker(); virtual void MarkAsCleanShutdown(); #ifdef CHROME_PERSONALIZATION - virtual ProfilePersonalization GetProfilePersonalization(); + virtual ProfilePersonalization* GetProfilePersonalization(); #endif private: @@ -261,7 +261,7 @@ class ProfileImpl : public Profile { friend class Profile; - ProfileImpl(const std::wstring& path); + explicit ProfileImpl(const std::wstring& path); void CreateWebDataService(); std::wstring GetPrefFilePath(); @@ -281,7 +281,7 @@ class ProfileImpl : public Profile { scoped_ptr<BookmarkModel> bookmark_bar_model_; #ifdef CHROME_PERSONALIZATION - ProfilePersonalization personalization_; + scoped_ptr<ProfilePersonalization> personalization_; #endif RequestContext* request_context_; |