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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 1055863002: ChromeOS: switch UI language before apps are loaded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698