Commit 8143565e authored by amistry@chromium.org's avatar amistry@chromium.org

Fall back to the application locale if a profile one doesn't exist on ChromeOS.

Review URL: https://codereview.chromium.org/496223002

Cr-Commit-Position: refs/heads/master@{#291543}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291543 0039d316-1c4b-4281-b951-d872f2087c98
parent 1fd62287
......@@ -142,14 +142,15 @@ ExtensionService* GetExtensionService(Profile* profile) {
}
std::string GetCurrentLocale(Profile* profile) {
std::string locale =
#if defined(OS_CHROMEOS)
// On ChromeOS locale is per-profile.
std::string profile_locale =
profile->GetPrefs()->GetString(prefs::kApplicationLocale);
#else
g_browser_process->GetApplicationLocale();
if (!profile_locale.empty()) {
// On ChromeOS locale is per-profile, but only if set.
return profile_locale;
}
#endif
return locale;
return g_browser_process->GetApplicationLocale();
}
} // namespace
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment