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

Unified Diff: chrome/browser/google/google_util.cc

Issue 327833002: Change google_util::GetGoogleLocale() to take in the application locale (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to review Created 6 years, 6 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/google/google_util.h ('k') | chrome/browser/ui/navigation_correction_tab_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google/google_util.cc
diff --git a/chrome/browser/google/google_util.cc b/chrome/browser/google/google_util.cc
index dead358cada642ebf4389a21851e93888569c066..47e9d78f56ec6ad295be5d49418a5d488888b536 100644
--- a/chrome/browser/google/google_util.cc
+++ b/chrome/browser/google/google_util.cc
@@ -67,17 +67,14 @@ void SetMockLinkDoctorBaseURLForTesting() {
gUseMockLinkDoctorBaseURLForTesting = true;
}
-std::string GetGoogleLocale() {
- std::string locale = g_browser_process->GetApplicationLocale();
- // Google does not yet recognize 'nb' for Norwegian Bokmal, but it uses
- // 'no' for that.
- if (locale == "nb")
- return "no";
- return locale;
+std::string GetGoogleLocale(const std::string& application_locale) {
+ // Google does not recognize "nb" for Norwegian Bokmal; it uses "no".
+ return (application_locale == "nb") ? "no" : application_locale;
}
GURL AppendGoogleLocaleParam(const GURL& url) {
- return net::AppendQueryParameter(url, "hl", GetGoogleLocale());
+ return net::AppendQueryParameter(
+ url, "hl", GetGoogleLocale(g_browser_process->GetApplicationLocale()));
}
std::string StringAppendGoogleLocaleParam(const std::string& url) {
« no previous file with comments | « chrome/browser/google/google_util.h ('k') | chrome/browser/ui/navigation_correction_tab_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698