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

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

Issue 327793005: Change google_util::AppendGoogleLocaleParam to take in the application locale (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits 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
Index: chrome/browser/google/google_util.cc
diff --git a/chrome/browser/google/google_util.cc b/chrome/browser/google/google_util.cc
index 47e9d78f56ec6ad295be5d49418a5d488888b536..12719cc3675c0709227e7af1cac8050a4ef1b30f 100644
--- a/chrome/browser/google/google_util.cc
+++ b/chrome/browser/google/google_util.cc
@@ -13,7 +13,6 @@
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/browser_process.h"
#include "chrome/common/net/url_fixer_upper.h"
#include "components/google/core/browser/google_switches.h"
#include "components/google/core/browser/google_url_tracker.h"
@@ -72,16 +71,10 @@ std::string GetGoogleLocale(const std::string& application_locale) {
return (application_locale == "nb") ? "no" : application_locale;
}
-GURL AppendGoogleLocaleParam(const GURL& url) {
+GURL AppendGoogleLocaleParam(const GURL& url,
+ const std::string& application_locale) {
return net::AppendQueryParameter(
- url, "hl", GetGoogleLocale(g_browser_process->GetApplicationLocale()));
-}
-
-std::string StringAppendGoogleLocaleParam(const std::string& url) {
- GURL original_url(url);
- DCHECK(original_url.is_valid());
- GURL localized_url = AppendGoogleLocaleParam(original_url);
- return localized_url.spec();
+ url, "hl", GetGoogleLocale(application_locale));
}
std::string GetGoogleCountryCode(GURL google_homepage_url) {

Powered by Google App Engine
This is Rietveld 408576698