summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 17:07:46 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 17:07:46 +0000
commitff622aa41f2eb00c4f0359a1d661f77ea17d29e1 (patch)
tree0eb7fca9bdb735299cdb3224814c8313bb99301e
parent568f33de361dbca27e55bd2c1c025663c7a73d3c (diff)
downloadchromium_src-ff622aa41f2eb00c4f0359a1d661f77ea17d29e1.zip
chromium_src-ff622aa41f2eb00c4f0359a1d661f77ea17d29e1.tar.gz
chromium_src-ff622aa41f2eb00c4f0359a1d661f77ea17d29e1.tar.bz2
Remove wstrings from l10n_util/ResourceBundle locale functions.
Review URL: http://codereview.chromium.org/3069026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54917 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--app/l10n_util.cc12
-rw-r--r--app/l10n_util.h2
-rw-r--r--app/l10n_util_unittest.cc66
-rw-r--r--app/resource_bundle.cc4
-rw-r--r--app/resource_bundle.h6
-rw-r--r--app/resource_bundle_dummy.cc2
-rw-r--r--app/resource_bundle_posix.cc2
-rw-r--r--app/resource_bundle_win.cc2
-rw-r--r--app/test_suite.h2
-rw-r--r--chrome/app/chrome_dll_main.cc4
-rw-r--r--chrome/browser/browser_main.cc2
-rw-r--r--chrome/browser/browser_main_mac.mm2
-rw-r--r--chrome/browser/chromeos/input_method/candidate_window.cc2
-rw-r--r--chrome/browser/chromeos/login/language_switch_menu.cc2
-rw-r--r--chrome/browser/chromeos/login/wizard_controller.cc2
-rw-r--r--chrome/common/extensions/extension_resource_unittest.cc2
-rw-r--r--chrome/common/extensions/extension_unittest.cc2
-rw-r--r--chrome/test/unit/chrome_test_suite.h2
-rw-r--r--chrome_frame/test/net/fake_external_tab.cc2
-rw-r--r--views/controls/label_unittest.cc4
-rw-r--r--views/examples/examples_main.cc2
21 files changed, 62 insertions, 64 deletions
diff --git a/app/l10n_util.cc b/app/l10n_util.cc
index 0837c02..7b8ceb3 100644
--- a/app/l10n_util.cc
+++ b/app/l10n_util.cc
@@ -366,9 +366,8 @@ void SplitAndNormalizeLanguageList(const std::string& env_language,
namespace l10n_util {
-std::string GetApplicationLocale(const std::wstring& pref_locale) {
+std::string GetApplicationLocale(const std::string& pref_locale) {
#if !defined(OS_MACOSX)
-
FilePath locale_path;
PathService::Get(app::DIR_LOCALES, &locale_path);
std::string resolved_locale;
@@ -382,7 +381,7 @@ std::string GetApplicationLocale(const std::wstring& pref_locale) {
#if defined(OS_WIN)
// First, try the preference value.
if (!pref_locale.empty())
- candidates.push_back(WideToASCII(pref_locale));
+ candidates.push_back(pref_locale);
// Next, try the system locale.
candidates.push_back(system_locale);
@@ -390,7 +389,7 @@ std::string GetApplicationLocale(const std::wstring& pref_locale) {
#elif defined(OS_CHROMEOS)
// On ChromeOS, use the application locale preference.
if (!pref_locale.empty())
- candidates.push_back(WideToASCII(pref_locale));
+ candidates.push_back(pref_locale);
#elif defined(OS_POSIX)
// On POSIX, we also check LANGUAGE environment variable, which is supported
@@ -432,9 +431,8 @@ std::string GetApplicationLocale(const std::wstring& pref_locale) {
// Use any override (Cocoa for the browser), otherwise use the preference
// passed to the function.
std::string app_locale = l10n_util::GetLocaleOverride();
- if (app_locale.empty()) {
- app_locale = WideToASCII(pref_locale);
- }
+ if (app_locale.empty())
+ app_locale = pref_locale;
// The above should handle all of the cases Chrome normally hits, but for some
// unit tests, we need something to fall back too.
diff --git a/app/l10n_util.h b/app/l10n_util.h
index 7f7b18a..62789a9 100644
--- a/app/l10n_util.h
+++ b/app/l10n_util.h
@@ -39,7 +39,7 @@ namespace l10n_util {
// as |pref_locale|), finally, we fall back on the system locale. We only return
// a value if there's a corresponding resource DLL for the locale. Otherwise,
// we fall back to en-us.
-std::string GetApplicationLocale(const std::wstring& pref_locale);
+std::string GetApplicationLocale(const std::string& pref_locale);
// Given a locale code, return true if the OS is capable of supporting it.
// For instance, Oriya is not well supported on Windows XP and we return
diff --git a/app/l10n_util_unittest.cc b/app/l10n_util_unittest.cc
index 0625154..9106ee2 100644
--- a/app/l10n_util_unittest.cc
+++ b/app/l10n_util_unittest.cc
@@ -145,23 +145,23 @@ TEST_F(L10nUtilTest, GetAppLocale) {
// Test the support of LANGUAGE environment variable.
SetICUDefaultLocale("en-US");
env->SetEnv("LANGUAGE", "xx:fr_CA");
- EXPECT_EQ("fr", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("fr", l10n_util::GetApplicationLocale(""));
env->SetEnv("LANGUAGE", "xx:yy:en_gb.utf-8@quot");
- EXPECT_EQ("en-GB", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("en-GB", l10n_util::GetApplicationLocale(""));
env->SetEnv("LANGUAGE", "xx:zh-hk");
- EXPECT_EQ("zh-TW", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("zh-TW", l10n_util::GetApplicationLocale(""));
// We emulate gettext's behavior here, which ignores LANG/LC_MESSAGES/LC_ALL
// when LANGUAGE is specified. If no language specified in LANGUAGE is valid,
// then just fallback to the default language, which is en-US for us.
SetICUDefaultLocale("fr-FR");
env->SetEnv("LANGUAGE", "xx:yy");
- EXPECT_EQ("en-US", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("en-US", l10n_util::GetApplicationLocale(""));
env->SetEnv("LANGUAGE", "/fr:zh_CN");
- EXPECT_EQ("zh-CN", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("zh-CN", l10n_util::GetApplicationLocale(""));
// Make sure the follow tests won't be affected by LANGUAGE environment
// variable.
@@ -169,86 +169,86 @@ TEST_F(L10nUtilTest, GetAppLocale) {
#endif // defined(OS_POSIX) && !defined(OS_CHROMEOS)
SetICUDefaultLocale("en-US");
- EXPECT_EQ("en-US", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("en-US", l10n_util::GetApplicationLocale(""));
SetICUDefaultLocale("xx");
- EXPECT_EQ("en-US", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("en-US", l10n_util::GetApplicationLocale(""));
#if defined(OS_CHROMEOS)
// ChromeOS honors preferred locale first in GetApplicationLocale(),
// defaulting to en-US, while other targets first honor other signals.
SetICUDefaultLocale("en-GB");
- EXPECT_EQ("en-US", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("en-US", l10n_util::GetApplicationLocale(""));
SetICUDefaultLocale("en-US");
- EXPECT_EQ("en-GB", l10n_util::GetApplicationLocale(L"en-GB"));
+ EXPECT_EQ("en-GB", l10n_util::GetApplicationLocale("en-GB"));
#else // defined(OS_CHROMEOS)
SetICUDefaultLocale("en-GB");
- EXPECT_EQ("en-GB", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("en-GB", l10n_util::GetApplicationLocale(""));
SetICUDefaultLocale("fr-CA");
- EXPECT_EQ("fr", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("fr", l10n_util::GetApplicationLocale(""));
SetICUDefaultLocale("es-MX");
- EXPECT_EQ("es-419", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("es-419", l10n_util::GetApplicationLocale(""));
SetICUDefaultLocale("es-AR");
- EXPECT_EQ("es-419", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("es-419", l10n_util::GetApplicationLocale(""));
SetICUDefaultLocale("es-ES");
- EXPECT_EQ("es", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("es", l10n_util::GetApplicationLocale(""));
SetICUDefaultLocale("es");
- EXPECT_EQ("es", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("es", l10n_util::GetApplicationLocale(""));
SetICUDefaultLocale("zh-HK");
- EXPECT_EQ("zh-TW", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("zh-TW", l10n_util::GetApplicationLocale(""));
SetICUDefaultLocale("zh-MK");
- EXPECT_EQ("zh-TW", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("zh-TW", l10n_util::GetApplicationLocale(""));
SetICUDefaultLocale("zh-SG");
- EXPECT_EQ("zh-CN", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("zh-CN", l10n_util::GetApplicationLocale(""));
#endif // defined (OS_CHROMEOS)
#if defined(OS_WIN)
// We don't allow user prefs for locale on linux/mac.
SetICUDefaultLocale("en-US");
- EXPECT_EQ("fr", l10n_util::GetApplicationLocale(L"fr"));
- EXPECT_EQ("fr", l10n_util::GetApplicationLocale(L"fr-CA"));
+ EXPECT_EQ("fr", l10n_util::GetApplicationLocale("fr"));
+ EXPECT_EQ("fr", l10n_util::GetApplicationLocale("fr-CA"));
SetICUDefaultLocale("en-US");
// Aliases iw, no, tl to he, nb, fil.
- EXPECT_EQ("he", l10n_util::GetApplicationLocale(L"iw"));
- EXPECT_EQ("nb", l10n_util::GetApplicationLocale(L"no"));
- EXPECT_EQ("fil", l10n_util::GetApplicationLocale(L"tl"));
+ EXPECT_EQ("he", l10n_util::GetApplicationLocale("iw"));
+ EXPECT_EQ("nb", l10n_util::GetApplicationLocale("no"));
+ EXPECT_EQ("fil", l10n_util::GetApplicationLocale("tl"));
// es-419 and es-XX (where XX is not Spain) should be
// mapped to es-419 (Latin American Spanish).
- EXPECT_EQ("es-419", l10n_util::GetApplicationLocale(L"es-419"));
- EXPECT_EQ("es", l10n_util::GetApplicationLocale(L"es-ES"));
- EXPECT_EQ("es-419", l10n_util::GetApplicationLocale(L"es-AR"));
+ EXPECT_EQ("es-419", l10n_util::GetApplicationLocale("es-419"));
+ EXPECT_EQ("es", l10n_util::GetApplicationLocale("es-ES"));
+ EXPECT_EQ("es-419", l10n_util::GetApplicationLocale("es-AR"));
SetICUDefaultLocale("es-AR");
- EXPECT_EQ("es", l10n_util::GetApplicationLocale(L"es"));
+ EXPECT_EQ("es", l10n_util::GetApplicationLocale("es"));
SetICUDefaultLocale("zh-HK");
- EXPECT_EQ("zh-CN", l10n_util::GetApplicationLocale(L"zh-CN"));
+ EXPECT_EQ("zh-CN", l10n_util::GetApplicationLocale("zh-CN"));
SetICUDefaultLocale("he");
- EXPECT_EQ("en-US", l10n_util::GetApplicationLocale(L"en"));
+ EXPECT_EQ("en-US", l10n_util::GetApplicationLocale("en"));
// Amharic should be blocked unless OS is Vista or newer.
if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) {
SetICUDefaultLocale("am");
- EXPECT_EQ("en-US", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("en-US", l10n_util::GetApplicationLocale(""));
SetICUDefaultLocale("en-GB");
- EXPECT_EQ("en-GB", l10n_util::GetApplicationLocale(L"am"));
+ EXPECT_EQ("en-GB", l10n_util::GetApplicationLocale("am"));
} else {
SetICUDefaultLocale("am");
- EXPECT_EQ("am", l10n_util::GetApplicationLocale(L""));
+ EXPECT_EQ("am", l10n_util::GetApplicationLocale(""));
SetICUDefaultLocale("en-GB");
- EXPECT_EQ("am", l10n_util::GetApplicationLocale(L"am"));
+ EXPECT_EQ("am", l10n_util::GetApplicationLocale("am"));
}
#endif // defined(OS_WIN)
diff --git a/app/resource_bundle.cc b/app/resource_bundle.cc
index c125907..25b0d81 100644
--- a/app/resource_bundle.cc
+++ b/app/resource_bundle.cc
@@ -37,7 +37,7 @@ const SkColor ResourceBundle::toolbar_separator_color =
/* static */
std::string ResourceBundle::InitSharedInstance(
- const std::wstring& pref_locale) {
+ const std::string& pref_locale) {
DCHECK(g_shared_instance_ == NULL) << "ResourceBundle initialized twice";
g_shared_instance_ = new ResourceBundle();
@@ -47,7 +47,7 @@ std::string ResourceBundle::InitSharedInstance(
/* static */
std::string ResourceBundle::ReloadSharedInstance(
- const std::wstring& pref_locale) {
+ const std::string& pref_locale) {
DCHECK(g_shared_instance_ != NULL) << "ResourceBundle not initialized";
g_shared_instance_->UnloadLocaleResources();
diff --git a/app/resource_bundle.h b/app/resource_bundle.h
index c6bc5c3..49ca359 100644
--- a/app/resource_bundle.h
+++ b/app/resource_bundle.h
@@ -68,7 +68,7 @@ class ResourceBundle {
// selected.
// NOTE: Mac ignores this and always loads up resources for the language
// defined by the Cocoa UI (ie-NSBundle does the langange work).
- static std::string InitSharedInstance(const std::wstring& pref_locale);
+ static std::string InitSharedInstance(const std::string& pref_locale);
// Changes the locale for an already-initialized ResourceBundle. Future
// calls to get strings will return the strings for this new locale. This
@@ -76,7 +76,7 @@ class ResourceBundle {
// on existing or future image resources, and thus does not use the lock to
// guarantee thread-safety, since all string access is expected to happen on
// the UI thread.
- static std::string ReloadSharedInstance(const std::wstring& pref_locale);
+ static std::string ReloadSharedInstance(const std::string& pref_locale);
// Registers additional data pack files with the global ResourceBundle. When
// looking for a DataResource, we will search these files after searching the
@@ -200,7 +200,7 @@ class ResourceBundle {
// Try to load the locale specific strings from an external data module.
// Returns the locale that is loaded.
- std::string LoadLocaleResources(const std::wstring& pref_locale);
+ std::string LoadLocaleResources(const std::string& pref_locale);
// Unload the locale specific strings and prepares to load new ones. See
// comments for ReloadSharedInstance().
diff --git a/app/resource_bundle_dummy.cc b/app/resource_bundle_dummy.cc
index f5db317..53a1435 100644
--- a/app/resource_bundle_dummy.cc
+++ b/app/resource_bundle_dummy.cc
@@ -25,7 +25,7 @@ namespace gfx {
/* static */
std::string ResourceBundle::InitSharedInstance(
- const std::wstring& pref_locale) {
+ const std::string& pref_locale) {
DCHECK(g_shared_instance_ == NULL) << "ResourceBundle initialized twice";
g_shared_instance_ = new ResourceBundle();
return std::string();
diff --git a/app/resource_bundle_posix.cc b/app/resource_bundle_posix.cc
index 1ee5fd1..9944280 100644
--- a/app/resource_bundle_posix.cc
+++ b/app/resource_bundle_posix.cc
@@ -102,7 +102,7 @@ void ResourceBundle::LoadCommonResources() {
}
std::string ResourceBundle::LoadLocaleResources(
- const std::wstring& pref_locale) {
+ const std::string& pref_locale) {
DCHECK(!locale_resources_data_) << "locale.pak already loaded";
std::string app_locale = l10n_util::GetApplicationLocale(pref_locale);
FilePath locale_file_path = GetLocaleFilePath(app_locale);
diff --git a/app/resource_bundle_win.cc b/app/resource_bundle_win.cc
index f143193..6676dc6 100644
--- a/app/resource_bundle_win.cc
+++ b/app/resource_bundle_win.cc
@@ -55,7 +55,7 @@ void ResourceBundle::LoadCommonResources() {
}
std::string ResourceBundle::LoadLocaleResources(
- const std::wstring& pref_locale) {
+ const std::string& pref_locale) {
DCHECK(NULL == locale_resources_data_) << "locale dll already loaded";
const std::string app_locale = l10n_util::GetApplicationLocale(pref_locale);
const FilePath& locale_path = GetLocaleFilePath(app_locale);
diff --git a/app/test_suite.h b/app/test_suite.h
index 37e2322..eeea436 100644
--- a/app/test_suite.h
+++ b/app/test_suite.h
@@ -60,7 +60,7 @@ class AppTestSuite : public TestSuite {
// Force unittests to run using en-US so if we test against string
// output, it'll pass regardless of the system language.
- ResourceBundle::InitSharedInstance(L"en-US");
+ ResourceBundle::InitSharedInstance("en-US");
}
virtual void Shutdown() {
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index e65ac91..fd10a9d 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -742,8 +742,8 @@ int ChromeMain(int argc, char** argv) {
// via the preference prefs::kApplicationLocale. The browser process uses
// the --lang flag to passe the value of the PrefService in here. Maybe this
// value could be passed in a different way.
- ResourceBundle::InitSharedInstance(ASCIIToWide(
- parsed_command_line.GetSwitchValueASCII(switches::kLang)));
+ ResourceBundle::InitSharedInstance(
+ parsed_command_line.GetSwitchValueASCII(switches::kLang));
#if defined(OS_MACOSX)
// Update the process name (need resources to get the strings, so
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index c5117a4..4d621bf 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -856,7 +856,7 @@ int BrowserMain(const MainFunctionParams& parameters) {
// On a POSIX OS other than ChromeOS, the parameter that is passed to the
// method InitSharedInstance is ignored.
std::string app_locale = ResourceBundle::InitSharedInstance(
- ASCIIToWide(local_state->GetString(prefs::kApplicationLocale)));
+ local_state->GetString(prefs::kApplicationLocale));
g_browser_process->SetApplicationLocale(app_locale);
FilePath resources_pack_path;
diff --git a/chrome/browser/browser_main_mac.mm b/chrome/browser/browser_main_mac.mm
index 3123a36..5aa5999 100644
--- a/chrome/browser/browser_main_mac.mm
+++ b/chrome/browser/browser_main_mac.mm
@@ -91,7 +91,7 @@ class BrowserMainPartsMac : public BrowserMainPartsPosix {
// Before we load the nib, we need to start up the resource bundle so we
// have the strings avaiable for localization.
- std::wstring pref_locale;
+ std::string pref_locale;
// TODO(markusheintz): Read preference pref::kApplicationLocale in order
// to enforce the application locale.
ResourceBundle::InitSharedInstance(pref_locale);
diff --git a/chrome/browser/chromeos/input_method/candidate_window.cc b/chrome/browser/chromeos/input_method/candidate_window.cc
index 2c327270..c7b3e7e 100644
--- a/chrome/browser/chromeos/input_method/candidate_window.cc
+++ b/chrome/browser/chromeos/input_method/candidate_window.cc
@@ -1053,7 +1053,7 @@ int main(int argc, char** argv) {
// ResourceBundle code now ignores the --Lang flag.
// In order to support the --Lang flag here the preference
// prefs::kApplicationLocale must be read and passed instead of L"en-US".
- ResourceBundle::InitSharedInstance(L"en-US");
+ ResourceBundle::InitSharedInstance("en-US");
// Write logs to a file for debugging, if --logtofile=FILE_NAME is given.
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
diff --git a/chrome/browser/chromeos/login/language_switch_menu.cc b/chrome/browser/chromeos/login/language_switch_menu.cc
index d32a0a3..884583b 100644
--- a/chrome/browser/chromeos/login/language_switch_menu.cc
+++ b/chrome/browser/chromeos/login/language_switch_menu.cc
@@ -96,7 +96,7 @@ void LanguageSwitchMenu::SwitchLanguage(const std::string& locale) {
prefs->SavePersistentPrefs();
// Switch the locale.
- ResourceBundle::ReloadSharedInstance(UTF8ToWide(locale));
+ ResourceBundle::ReloadSharedInstance(locale);
// Enable the keyboard layouts that are necessary for the new locale.
chromeos::input_method::EnableInputMethods(
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc
index 4dccf67..8d3ed53 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -829,7 +829,7 @@ void ShowLoginWizard(const std::string& first_screen_name,
locale = controller->GetCustomization()->initial_locale();
LOG(INFO) << "initial locale: " << locale;
if (!locale.empty()) {
- ResourceBundle::ReloadSharedInstance(UTF8ToWide(locale));
+ ResourceBundle::ReloadSharedInstance(locale);
}
}
}
diff --git a/chrome/common/extensions/extension_resource_unittest.cc b/chrome/common/extensions/extension_resource_unittest.cc
index 189e4d6..1590225e 100644
--- a/chrome/common/extensions/extension_resource_unittest.cc
+++ b/chrome/common/extensions/extension_resource_unittest.cc
@@ -58,7 +58,7 @@ TEST(ExtensionResourceTest, CreateWithAllResourcesOnDisk) {
ASSERT_TRUE(file_util::CreateDirectory(l10n_path));
std::vector<std::string> locales;
- extension_l10n_util::GetParentLocales(l10n_util::GetApplicationLocale(L""),
+ extension_l10n_util::GetParentLocales(l10n_util::GetApplicationLocale(""),
&locales);
ASSERT_FALSE(locales.empty());
for (size_t i = 0; i < locales.size(); i++) {
diff --git a/chrome/common/extensions/extension_unittest.cc b/chrome/common/extensions/extension_unittest.cc
index 17c176d..43db9b0 100644
--- a/chrome/common/extensions/extension_unittest.cc
+++ b/chrome/common/extensions/extension_unittest.cc
@@ -352,7 +352,7 @@ TEST(ExtensionTest, InitFromValueValidNameInRTL) {
GtkTextDirection gtk_dir = gtk_widget_get_default_direction();
gtk_widget_set_default_direction(GTK_TEXT_DIR_RTL);
#else
- std::string locale = l10n_util::GetApplicationLocale(std::wstring());
+ std::string locale = l10n_util::GetApplicationLocale("");
base::i18n::SetICUDefaultLocale("he");
#endif
diff --git a/chrome/test/unit/chrome_test_suite.h b/chrome/test/unit/chrome_test_suite.h
index 97d7140..b788879 100644
--- a/chrome/test/unit/chrome_test_suite.h
+++ b/chrome/test/unit/chrome_test_suite.h
@@ -135,7 +135,7 @@ class ChromeTestSuite : public TestSuite {
// Force unittests to run using en-US so if we test against string
// output, it'll pass regardless of the system language.
- ResourceBundle::InitSharedInstance(L"en-US");
+ ResourceBundle::InitSharedInstance("en-US");
// initialize the global StatsTable for unit_tests (make sure the file
// doesn't exist before opening it so the test gets a clean slate)
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc
index ca0eece..57b829e 100644
--- a/chrome_frame/test/net/fake_external_tab.cc
+++ b/chrome_frame/test/net/fake_external_tab.cc
@@ -201,7 +201,7 @@ void FakeExternalTab::Initialize() {
DCHECK(res_mod);
_AtlBaseModule.SetResourceInstance(res_mod);
- ResourceBundle::InitSharedInstance(L"en-US");
+ ResourceBundle::InitSharedInstance("en-US");
CommandLine* cmd = CommandLine::ForCurrentProcess();
cmd->AppendSwitch(switches::kDisableWebResources);
diff --git a/views/controls/label_unittest.cc b/views/controls/label_unittest.cc
index d238cb3..e072b80 100644
--- a/views/controls/label_unittest.cc
+++ b/views/controls/label_unittest.cc
@@ -550,7 +550,7 @@ TEST(LabelTest, DrawSingleLineStringInRTL) {
Label label;
label.SetFocusable(false);
- std::string locale = l10n_util::GetApplicationLocale(std::wstring());
+ std::string locale = l10n_util::GetApplicationLocale("");
base::i18n::SetICUDefaultLocale("he");
std::wstring test_text(L"Here's a string with no returns.");
@@ -672,7 +672,7 @@ TEST(LabelTest, DrawMultiLineStringInRTL) {
label.SetFocusable(false);
// Test for RTL.
- std::string locale = l10n_util::GetApplicationLocale(std::wstring());
+ std::string locale = l10n_util::GetApplicationLocale("");
base::i18n::SetICUDefaultLocale("he");
std::wstring test_text(L"Another string\nwith returns\n\n!");
diff --git a/views/examples/examples_main.cc b/views/examples/examples_main.cc
index 82cc144..c3a0eb9 100644
--- a/views/examples/examples_main.cc
+++ b/views/examples/examples_main.cc
@@ -59,7 +59,7 @@ void ExamplesMain::Run() {
icu_util::Initialize();
- ResourceBundle::InitSharedInstance(L"en-US");
+ ResourceBundle::InitSharedInstance("en-US");
MessageLoop main_message_loop(MessageLoop::TYPE_UI);