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..ba5b26799f8f7ebd5ecf72bff76160b932ac8bf1 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"); |
- SCOPED_UMA_HISTOGRAM_TIMER("Profile.OnPrefsLoadedTime"); |
- if (!success) { |
- if (delegate_) |
- delegate_->OnProfileCreated(this, false, false); |
- return; |
- } |
- |
+void ProfileImpl::OnLocaleReady() { |
+ SCOPED_UMA_HISTOGRAM_TIMER("Profile.OnLocaleReadyTime"); |
// Migrate obsolete prefs. |
if (g_browser_process->local_state()) |
chrome::MigrateObsoleteBrowserPrefs(this, g_browser_process->local_state()); |
@@ -861,6 +854,23 @@ 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; |
+ } |
+ |
+#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); |