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

Side by Side Diff: chrome/browser/profiles/profile_impl.cc

Issue 2159133002: Shutdown StoragePartition before ProfileIOData is being shut down (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/profile_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 710
711 BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices( 711 BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices(
712 this); 712 this);
713 713
714 if (pref_proxy_config_tracker_) 714 if (pref_proxy_config_tracker_)
715 pref_proxy_config_tracker_->DetachFromPrefService(); 715 pref_proxy_config_tracker_->DetachFromPrefService();
716 716
717 // This causes the Preferences file to be written to disk. 717 // This causes the Preferences file to be written to disk.
718 if (prefs_loaded) 718 if (prefs_loaded)
719 SetExitType(EXIT_NORMAL); 719 SetExitType(EXIT_NORMAL);
720
721 // This must be called before ProfileIOData::ShutdownOnUIThread but after
722 // other profile-related destroy notifications are dispatched.
723 ShutdownStoragePartitions();
720 } 724 }
721 725
722 std::string ProfileImpl::GetProfileUserName() const { 726 std::string ProfileImpl::GetProfileUserName() const {
723 const SigninManagerBase* signin_manager = 727 const SigninManagerBase* signin_manager =
724 SigninManagerFactory::GetForProfileIfExists(this); 728 SigninManagerFactory::GetForProfileIfExists(this);
725 if (signin_manager) 729 if (signin_manager)
726 return signin_manager->GetAuthenticatedAccountInfo().email; 730 return signin_manager->GetAuthenticatedAccountInfo().email;
727 731
728 return std::string(); 732 return std::string();
729 } 733 }
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { 1284 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) {
1281 domain_reliability::DomainReliabilityService* service = 1285 domain_reliability::DomainReliabilityService* service =
1282 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> 1286 domain_reliability::DomainReliabilityServiceFactory::GetInstance()->
1283 GetForBrowserContext(this); 1287 GetForBrowserContext(this);
1284 if (!service) 1288 if (!service)
1285 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); 1289 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>();
1286 1290
1287 return service->CreateMonitor( 1291 return service->CreateMonitor(
1288 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); 1292 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
1289 } 1293 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_io_data.h ('k') | chrome/browser/profiles/profile_impl_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698