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

Unified Diff: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc

Issue 325963007: Do not append Google locale to help center links (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
Index: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index 772714edc605b6a40ec4a3e03c5ec0bafc22eccb..93bfbcd2868673e6ca65d8b2b41b9d69cabd8d2f 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -81,10 +81,6 @@ const char kLearnMoreIncognitoUrl[] =
const char kLearnMoreGuestSessionUrl[] =
"https://www.google.com/support/chromeos/bin/answer.py?answer=1057090";
-base::string16 GetUrlWithLang(const GURL& url) {
- return base::ASCIIToUTF16(google_util::AppendGoogleLocaleParam(url).spec());
-}
-
std::string SkColorToRGBAString(SkColor color) {
// We convert the alpha using DoubleToString because StringPrintf will use
// locale specific formatters (e.g., use , instead of . in German).
@@ -314,8 +310,7 @@ void NTPResourceCache::CreateNewTabIncognitoHTML() {
localized_strings.SetString("learnMore",
l10n_util::GetStringUTF16(new_tab_link_ids));
- localized_strings.SetString("learnMoreLink",
- GetUrlWithLang(GURL(new_tab_link)));
+ localized_strings.SetString("learnMoreLink", GURL(new_tab_link).spec());
bool bookmark_bar_attached = profile_->GetPrefs()->GetBoolean(
prefs::kShowBookmarkBar);
@@ -361,7 +356,7 @@ void NTPResourceCache::CreateNewTabGuestHTML() {
localized_strings.SetString("enterpriseLearnMore",
l10n_util::GetStringUTF16(IDS_LEARN_MORE));
localized_strings.SetString("enterpriseInfoHintLink",
- GetUrlWithLang(GURL(chrome::kLearnMoreEnterpriseURL)));
+ GURL(chrome::kLearnMoreEnterpriseURL).spec());
} else {
localized_strings.SetString("enterpriseInfoVisible", "false");
}
@@ -374,7 +369,7 @@ void NTPResourceCache::CreateNewTabGuestHTML() {
localized_strings.SetString("learnMore",
l10n_util::GetStringUTF16(guest_tab_link_ids));
localized_strings.SetString("learnMoreLink",
- GetUrlWithLang(GURL(guest_tab_link)));
+ GURL(guest_tab_link).spec());
webui::SetFontAndTextDirection(&localized_strings);
@@ -463,7 +458,8 @@ void NTPResourceCache::CreateNewTabHTML() {
load_time_data.SetString("learnMore",
l10n_util::GetStringUTF16(IDS_LEARN_MORE));
load_time_data.SetString("webStoreLink",
- GetUrlWithLang(GURL(extension_urls::GetWebstoreLaunchURL())));
+ google_util::AppendGoogleLocaleParam(
+ GURL(extension_urls::GetWebstoreLaunchURL())).spec());
load_time_data.SetString("appInstallHintText",
l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_INSTALL_HINT_LABEL));
load_time_data.SetBoolean("isDiscoveryInNTPEnabled",

Powered by Google App Engine
This is Rietveld 408576698