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

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

Issue 7248038: Profiles: Make NTPResourceCache a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Oops. Missed the point. Created 9 years, 6 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 4981a1b9199adc13545769b51f26c26e51acd8bc..9634ba13f1839c123b78366c3ac3e7b329487b22 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -576,12 +576,6 @@ void ProfileImpl::InitRegisteredProtocolHandlers() {
protocol_handler_registry_->Load();
}
-NTPResourceCache* ProfileImpl::GetNTPResourceCache() {
- if (!ntp_resource_cache_.get())
- ntp_resource_cache_.reset(new NTPResourceCache(this));
- return ntp_resource_cache_.get();
-}
-
FilePath ProfileImpl::last_selected_directory() {
return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory);
}
@@ -598,6 +592,9 @@ ProfileImpl::~ProfileImpl() {
StopCreateSessionServiceTimer();
+ // Remove pref observers
+ pref_change_registrar_.RemoveAll();
+
ProfileDependencyManager::GetInstance()->DestroyProfileServices(this);
if (clear_local_state_on_exit_) {
@@ -614,12 +611,6 @@ ProfileImpl::~ProfileImpl() {
download_manager_ = NULL;
}
- // Remove pref observers
- pref_change_registrar_.RemoveAll();
-
- // Delete the NTP resource cache so we can unregister pref observers.
Elliot Glaysher 2011/06/29 19:12:00 This comment is seriously wrong. Pref observers ar
Miranda Callahan 2011/06/29 19:31:57 Ha! Nice catch.
- ntp_resource_cache_.reset();
-
// The sync service needs to be deleted before the services it calls.
sync_service_.reset();

Powered by Google App Engine
This is Rietveld 408576698