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) { |