summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_process_impl.h
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-10 00:04:48 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-10 00:04:48 +0000
commitce4b6a9dbb6ac14810294205185d385f066457fc (patch)
tree6c152e7d0e6ffc89b5c80eadbab5f24ec6ed7424 /chrome/browser/browser_process_impl.h
parenta437e4c7a38a959f3412df30b9b066c5d869ccc4 (diff)
downloadchromium_src-ce4b6a9dbb6ac14810294205185d385f066457fc.zip
chromium_src-ce4b6a9dbb6ac14810294205185d385f066457fc.tar.gz
chromium_src-ce4b6a9dbb6ac14810294205185d385f066457fc.tar.bz2
Make BrowserProcess::GetApplicationLocale thread safe and migrate
callers of l10n_util::GetApplicationLocale to use this instead. In the browser process, it's wrong to call l10n_util::GetApplicationLocale with an empty string because then it won't consider the user pref value when resolving the locale. On Linux, it's also wrong to call l10n_util::GetApplicationLocale after startup because the call touches disk and on Linux, we assume that all of the program files can be deleted after startup (so updates in place can work). Review URL: http://codereview.chromium.org/476002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34206 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_process_impl.h')
-rw-r--r--chrome/browser/browser_process_impl.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h
index 3d1bbcd..f4b0e7d 100644
--- a/chrome/browser/browser_process_impl.h
+++ b/chrome/browser/browser_process_impl.h
@@ -194,7 +194,13 @@ class BrowserProcessImpl : public BrowserProcess, public NonThreadSafe {
return google_url_tracker_.get();
}
- virtual const std::string& GetApplicationLocale();
+ virtual const std::string& GetApplicationLocale() {
+ DCHECK(!locale_.empty());
+ return locale_;
+ }
+ virtual void set_application_locale(const std::string& locale) {
+ locale_ = locale;
+ }
virtual base::WaitableEvent* shutdown_event() {
return shutdown_event_.get();