| Index: chrome/common/localized_error.cc
|
| diff --git a/chrome/renderer/localized_error.cc b/chrome/common/localized_error.cc
|
| similarity index 98%
|
| rename from chrome/renderer/localized_error.cc
|
| rename to chrome/common/localized_error.cc
|
| index 430c4afc9957475a75443a998a7959d43fadc5fa..56dd428a71e22ef395ec374b47713064dcd80540 100644
|
| --- a/chrome/renderer/localized_error.cc
|
| +++ b/chrome/common/localized_error.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chrome/renderer/localized_error.h"
|
| +#include "chrome/common/localized_error.h"
|
|
|
| #include "base/i18n/rtl.h"
|
| #include "base/logging.h"
|
| @@ -12,7 +12,6 @@
|
| #include "base/values.h"
|
| #include "chrome/common/extensions/extension_icon_set.h"
|
| #include "chrome/common/extensions/extension_set.h"
|
| -#include "content/public/renderer/render_thread.h"
|
| #include "googleurl/src/gurl.h"
|
| #include "grit/chromium_strings.h"
|
| #include "grit/generated_resources.h"
|
| @@ -27,7 +26,6 @@
|
| #endif
|
|
|
| using WebKit::WebURLError;
|
| -using content::RenderThread;
|
|
|
| namespace {
|
|
|
| @@ -442,7 +440,8 @@ DictionaryValue* GetStandardMenuItemsText() {
|
| const char LocalizedError::kHttpErrorDomain[] = "http";
|
|
|
| void LocalizedError::GetStrings(const WebKit::WebURLError& error,
|
| - DictionaryValue* error_strings) {
|
| + DictionaryValue* error_strings,
|
| + const std::string& locale) {
|
| bool rtl = LocaleIsRTL();
|
| error_strings->SetString("textdirection", rtl ? "rtl" : "ltr");
|
|
|
| @@ -654,9 +653,7 @@ void LocalizedError::GetStrings(const WebKit::WebURLError& error,
|
|
|
| if (learn_more_url.is_valid()) {
|
| // Add the language parameter to the URL.
|
| - std::string query = learn_more_url.query() + "&hl=" +
|
| - RenderThread::Get()->GetLocale();
|
| -
|
| + std::string query = learn_more_url.query() + "&hl=" + locale;
|
| GURL::Replacements repl;
|
| repl.SetQueryStr(query);
|
| learn_more_url = learn_more_url.ReplaceComponents(repl);
|
|
|