Chromium Code Reviews| 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(); |