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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
848 } | 848 } |
849 | 849 |
850 void ProfileImpl::OnPrefsLoaded(bool success) { | 850 void ProfileImpl::OnPrefsLoaded(bool success) { |
851 TRACE_EVENT0("browser", "ProfileImpl::OnPrefsLoaded") | 851 TRACE_EVENT0("browser", "ProfileImpl::OnPrefsLoaded") |
852 if (!success) { | 852 if (!success) { |
853 if (delegate_) | 853 if (delegate_) |
854 delegate_->OnProfileCreated(this, false, false); | 854 delegate_->OnProfileCreated(this, false, false); |
855 return; | 855 return; |
856 } | 856 } |
857 | 857 |
858 // TODO(mirandac): remove migration code after 6 months (crbug.com/69995). | |
859 if (g_browser_process->local_state()) | |
860 chrome::MigrateBrowserPrefs(this, g_browser_process->local_state()); | |
861 // TODO(ivankr): remove cleanup code eventually (crbug.com/165672). | 858 // TODO(ivankr): remove cleanup code eventually (crbug.com/165672). |
gab
2015/02/20 19:04:03
No, we shouldn't get rid of this hook.
If anythin
rkaplow
2015/02/20 19:08:53
Hm, ok.
How long should pref migration live for?
| |
862 chrome::MigrateUserPrefs(this); | 859 chrome::MigrateUserPrefs(this); |
863 | 860 |
864 // |kSessionExitType| was added after |kSessionExitedCleanly|. If the pref | 861 // |kSessionExitType| was added after |kSessionExitedCleanly|. If the pref |
865 // value is empty fallback to checking for |kSessionExitedCleanly|. | 862 // value is empty fallback to checking for |kSessionExitedCleanly|. |
866 const std::string exit_type_pref_value( | 863 const std::string exit_type_pref_value( |
867 prefs_->GetString(prefs::kSessionExitType)); | 864 prefs_->GetString(prefs::kSessionExitType)); |
868 if (exit_type_pref_value.empty()) { | 865 if (exit_type_pref_value.empty()) { |
869 last_session_exit_type_ = | 866 last_session_exit_type_ = |
870 prefs_->GetBoolean(prefs::kSessionExitedCleanly) ? | 867 prefs_->GetBoolean(prefs::kSessionExitedCleanly) ? |
871 EXIT_NORMAL : EXIT_CRASHED; | 868 EXIT_NORMAL : EXIT_CRASHED; |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1323 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { | 1320 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { |
1324 domain_reliability::DomainReliabilityService* service = | 1321 domain_reliability::DomainReliabilityService* service = |
1325 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1322 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
1326 GetForBrowserContext(this); | 1323 GetForBrowserContext(this); |
1327 if (!service) | 1324 if (!service) |
1328 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1325 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); |
1329 | 1326 |
1330 return service->CreateMonitor( | 1327 return service->CreateMonitor( |
1331 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 1328 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
1332 } | 1329 } |
OLD | NEW |