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

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: ChromeOS fix 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/printing/print_dialog_cloud.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 551cf320195f735a7d58e8630a8abe632102b020..a68e93897a8f5bacfa16d39211a0e1feff57da3c 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 "components/google/core/browser/google_switches.h"
#include "components/google/core/browser/google_url_tracker.h"
#include "components/url_fixer/url_fixer.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) {
« no previous file with comments | « chrome/browser/google/google_util.h ('k') | chrome/browser/printing/print_dialog_cloud.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698