summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-28 00:42:03 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-28 00:42:03 +0000
commit6de892232d348bc86167e0b9a984d0ffa3b4c5b6 (patch)
tree6d86c679103f7b0296faf86536b7b6d87db4a78a /chrome
parent98fb3a5a7ec855d5ddaea4bff7d7ef7571c9917d (diff)
downloadchromium_src-6de892232d348bc86167e0b9a984d0ffa3b4c5b6.zip
chromium_src-6de892232d348bc86167e0b9a984d0ffa3b4c5b6.tar.gz
chromium_src-6de892232d348bc86167e0b9a984d0ffa3b4c5b6.tar.bz2
Add the language to the google help center URL (hl=lang).
Review URL: http://codereview.chromium.org/8803 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4048 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/renderer/localized_error.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/renderer/localized_error.cc b/chrome/renderer/localized_error.cc
index b0e6d0e..b494ba6 100644
--- a/chrome/renderer/localized_error.cc
+++ b/chrome/renderer/localized_error.cc
@@ -12,6 +12,7 @@
#include "net/base/escape.h"
#include "net/base/net_errors.h"
#include "webkit/glue/weberror.h"
+#include "webkit/glue/webkit_glue.h"
#include "generated_resources.h"
@@ -178,10 +179,15 @@ void GetLocalizedErrorValues(const WebError& error,
default:
break;
}
- // TODO(tc): Move browser/google_util.* to common and uncomment:
- // learn_more_url = google_util::AppendGoogleLocaleParam(learn_more_url);
if (learn_more_url.is_valid()) {
+ // Add the language parameter to the URL.
+ std::string query = learn_more_url.query() + "&hl=" +
+ WideToASCII(webkit_glue::GetWebKitLocale());
+ GURL::Replacements repl;
+ repl.SetQueryStr(query);
+ learn_more_url = learn_more_url.ReplaceComponents(repl);
+
DictionaryValue* suggest_learn_more = new DictionaryValue;
suggest_learn_more->SetString(L"msg",
l10n_util::GetString(IDS_ERRORPAGES_SUGGESTION_LEARNMORE));