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 a491300e25d01cb01561cd352e74275adcbc51b3..e0644ec8b13278b88ecabb2ac0c5688ee503e994 100644 |
| --- a/chrome/browser/profiles/profile_impl.cc |
| +++ b/chrome/browser/profiles/profile_impl.cc |
| @@ -802,15 +802,8 @@ ExtensionSpecialStoragePolicy* |
| #endif |
| } |
| -void ProfileImpl::OnPrefsLoaded(bool success) { |
| - TRACE_EVENT0("browser", "ProfileImpl::OnPrefsLoaded"); |
| +void ProfileImpl::OnLocaleReady() { |
| SCOPED_UMA_HISTOGRAM_TIMER("Profile.OnPrefsLoadedTime"); |
|
robliao
2015/04/30 06:50:13
Should this timer label be updated?
Alexander Alekseev
2015/04/30 19:35:26
Done.
|
| - if (!success) { |
| - if (delegate_) |
| - delegate_->OnProfileCreated(this, false, false); |
| - return; |
| - } |
| - |
| // Migrate obsolete prefs. |
| if (g_browser_process->local_state()) |
| chrome::MigrateObsoleteBrowserPrefs(this, g_browser_process->local_state()); |
| @@ -861,6 +854,22 @@ void ProfileImpl::OnPrefsLoaded(bool success) { |
| DoFinalInit(); |
| } |
| +void ProfileImpl::OnPrefsLoaded(bool success) { |
| + TRACE_EVENT0("browser", "ProfileImpl::OnPrefsLoaded"); |
| + if (!success) { |
| + if (delegate_) |
| + delegate_->OnProfileCreated(this, false, false); |
| + return; |
|
robliao
2015/04/30 06:50:13
This return needs an extra linebreak above it.
Alexander Alekseev
2015/04/30 19:35:26
Done.
|
| + } |
| + |
| +#if defined(OS_CHROMEOS) |
| + chromeos::UserSessionManager::GetInstance()->RespectLocalePreferenceWrapper( |
| + this, base::Bind(&ProfileImpl::OnLocaleReady, base::Unretained(this))); |
| +#else |
| + OnLocaleReady(); |
| +#endif |
| +} |
| + |
| bool ProfileImpl::WasCreatedByVersionOrLater(const std::string& version) { |
| Version profile_version(ChromeVersionService::GetVersion(prefs_.get())); |
| Version arg_version(version); |