OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |