summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-07 20:17:15 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-07 20:17:15 +0000
commit3abebda09095620356405de505db7dd5bb22f3fd (patch)
treebcc452fba0136c39320294ea785b985145d62ad9 /chrome/browser
parenta2a5727cc4bfec1bb10db45378894034c9bbfe7d (diff)
downloadchromium_src-3abebda09095620356405de505db7dd5bb22f3fd.zip
chromium_src-3abebda09095620356405de505db7dd5bb22f3fd.tar.gz
chromium_src-3abebda09095620356405de505db7dd5bb22f3fd.tar.bz2
Remove wstring from l10n_util. Part 8, the last part.
BUG=9911 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6156001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70769 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/accessibility/browser_views_accessibility_browsertest.cc69
-rw-r--r--chrome/browser/bookmarks/bookmark_model.cc5
-rw-r--r--chrome/browser/chromeos/login/login_screen.cc2
-rw-r--r--chrome/browser/chromeos/login/network_screen.cc10
-rw-r--r--chrome/browser/chromeos/login/network_selection_view.cc20
-rw-r--r--chrome/browser/chromeos/login/new_user_view.cc15
-rw-r--r--chrome/browser/chromeos/login/oobe_progress_bar.cc3
-rw-r--r--chrome/browser/chromeos/login/password_changed_view.cc15
-rw-r--r--chrome/browser/chromeos/login/screen_locker.cc9
-rw-r--r--chrome/browser/chromeos/login/update_view.cc16
-rw-r--r--chrome/browser/chromeos/login/user_controller.cc8
-rw-r--r--chrome/browser/chromeos/login/user_controller_unittest.cc5
-rw-r--r--chrome/browser/chromeos/login/user_image_view.cc13
-rw-r--r--chrome/browser/chromeos/login/user_view.cc10
-rw-r--r--chrome/browser/chromeos/login/web_page_view.cc4
-rw-r--r--chrome/browser/chromeos/login/wizard_controller_browsertest.cc10
-rw-r--r--chrome/browser/chromeos/options/internet_page_view.cc18
-rw-r--r--chrome/browser/chromeos/options/language_chewing_config_view.cc14
-rw-r--r--chrome/browser/chromeos/options/language_config_util.h2
-rw-r--r--chrome/browser/chromeos/options/language_config_view.cc25
-rw-r--r--chrome/browser/chromeos/options/language_hangul_config_view.cc10
-rw-r--r--chrome/browser/chromeos/options/language_mozc_config_view.cc19
-rw-r--r--chrome/browser/chromeos/options/language_pinyin_config_view.cc10
-rw-r--r--chrome/browser/chromeos/options/network_config_view.cc5
-rw-r--r--chrome/browser/chromeos/options/options_window_view.cc20
-rw-r--r--chrome/browser/chromeos/options/settings_page_view.cc3
-rw-r--r--chrome/browser/chromeos/options/system_page_view.cc21
-rw-r--r--chrome/browser/chromeos/options/wifi_config_view.cc29
-rw-r--r--chrome/browser/chromeos/status/network_dropdown_button.cc12
-rw-r--r--chrome/browser/chromeos/status/network_menu_button.cc30
-rw-r--r--chrome/browser/ui/views/about_chrome_view.cc4
-rw-r--r--chrome/browser/ui/views/generic_info_view_unittest.cc4
-rw-r--r--chrome/browser/ui/views/keyboard_overlay_delegate.cc3
-rw-r--r--chrome/browser/ui/views/select_file_dialog.cc2
34 files changed, 253 insertions, 192 deletions
diff --git a/chrome/browser/accessibility/browser_views_accessibility_browsertest.cc b/chrome/browser/accessibility/browser_views_accessibility_browsertest.cc
index 6844409..9fbd160 100644
--- a/chrome/browser/accessibility/browser_views_accessibility_browsertest.cc
+++ b/chrome/browser/accessibility/browser_views_accessibility_browsertest.cc
@@ -129,9 +129,9 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest,
ASSERT_TRUE(NULL != acc_obj);
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kAboutBlankURL));
- std::wstring title =
- l10n_util::GetStringF(IDS_BROWSER_WINDOW_TITLE_FORMAT,
- ASCIIToWide(chrome::kAboutBlankURL));
+ std::wstring title = UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_BROWSER_WINDOW_TITLE_FORMAT,
+ ASCIIToUTF16(chrome::kAboutBlankURL)));
TestAccessibilityInfo(acc_obj, title, ROLE_SYSTEM_WINDOW);
}
@@ -142,7 +142,7 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, TestNonClientViewAccObj) {
GetBrowserView()->GetWindow()->GetNonClientView();
TestViewAccessibilityObject(non_client_view,
- l10n_util::GetString(IDS_PRODUCT_NAME),
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)),
ROLE_SYSTEM_WINDOW);
}
@@ -153,25 +153,28 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest,
views::View* browser_root_view =
GetBrowserView()->frame()->GetFrameView()->GetRootView();
- TestViewAccessibilityObject(browser_root_view,
- l10n_util::GetString(IDS_PRODUCT_NAME),
- ROLE_SYSTEM_APPLICATION);
+ TestViewAccessibilityObject(
+ browser_root_view,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)),
+ ROLE_SYSTEM_APPLICATION);
}
// Retrieve accessibility object for browser view and verify accessibility info.
IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, TestBrowserViewAccObj) {
// Verify root view MSAA name and role.
- TestViewAccessibilityObject(GetBrowserView(),
- l10n_util::GetString(IDS_PRODUCT_NAME),
- ROLE_SYSTEM_CLIENT);
+ TestViewAccessibilityObject(
+ GetBrowserView(),
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)),
+ ROLE_SYSTEM_CLIENT);
}
// Retrieve accessibility object for toolbar view and verify accessibility info.
IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, TestToolbarViewAccObj) {
// Verify toolbar MSAA name and role.
- TestViewAccessibilityObject(GetToolbarView(),
- l10n_util::GetString(IDS_ACCNAME_TOOLBAR),
- ROLE_SYSTEM_TOOLBAR);
+ TestViewAccessibilityObject(
+ GetToolbarView(),
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_TOOLBAR)),
+ ROLE_SYSTEM_TOOLBAR);
}
// Retrieve accessibility object for Back button and verify accessibility info.
@@ -179,7 +182,8 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, TestBackButtonAccObj) {
// Verify Back button MSAA name and role.
TestViewAccessibilityObject(
GetToolbarView()->GetViewByID(VIEW_ID_BACK_BUTTON),
- l10n_util::GetString(IDS_ACCNAME_BACK), ROLE_SYSTEM_BUTTONDROPDOWN);
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_BACK)),
+ ROLE_SYSTEM_BUTTONDROPDOWN);
}
// Retrieve accessibility object for Forward button and verify accessibility
@@ -188,7 +192,8 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, TestForwardButtonAccObj) {
// Verify Forward button MSAA name and role.
TestViewAccessibilityObject(
GetToolbarView()->GetViewByID(VIEW_ID_FORWARD_BUTTON),
- l10n_util::GetString(IDS_ACCNAME_FORWARD), ROLE_SYSTEM_BUTTONDROPDOWN);
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_FORWARD)),
+ ROLE_SYSTEM_BUTTONDROPDOWN);
}
// Retrieve accessibility object for Reload button and verify accessibility
@@ -197,7 +202,8 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, TestReloadButtonAccObj) {
// Verify Reload button MSAA name and role.
TestViewAccessibilityObject(
GetToolbarView()->GetViewByID(VIEW_ID_RELOAD_BUTTON),
- l10n_util::GetString(IDS_ACCNAME_RELOAD), ROLE_SYSTEM_PUSHBUTTON);
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_RELOAD)),
+ ROLE_SYSTEM_PUSHBUTTON);
}
// Retrieve accessibility object for Home button and verify accessibility info.
@@ -205,7 +211,8 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, TestHomeButtonAccObj) {
// Verify Home button MSAA name and role.
TestViewAccessibilityObject(
GetToolbarView()->GetViewByID(VIEW_ID_HOME_BUTTON),
- l10n_util::GetString(IDS_ACCNAME_HOME), ROLE_SYSTEM_PUSHBUTTON);
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_HOME)),
+ ROLE_SYSTEM_PUSHBUTTON);
}
// Retrieve accessibility object for Star button and verify accessibility info.
@@ -214,31 +221,35 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest,
// Verify Star button MSAA name and role.
TestViewAccessibilityObject(
GetToolbarView()->GetViewByID(VIEW_ID_STAR_BUTTON),
- l10n_util::GetString(IDS_ACCNAME_STAR), ROLE_SYSTEM_PUSHBUTTON);
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_STAR)),
+ ROLE_SYSTEM_PUSHBUTTON);
}
// Retrieve accessibility object for App menu button and verify accessibility
// info.
IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest, TestAppMenuAccObj) {
// Verify App menu button MSAA name and role.
- TestViewAccessibilityObject(GetToolbarView()->GetViewByID(VIEW_ID_APP_MENU),
- l10n_util::GetString(IDS_ACCNAME_APP),
- ROLE_SYSTEM_BUTTONMENU);
+ TestViewAccessibilityObject(
+ GetToolbarView()->GetViewByID(VIEW_ID_APP_MENU),
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_APP)),
+ ROLE_SYSTEM_BUTTONMENU);
}
IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest,
TestBookmarkBarViewAccObj) {
- TestViewAccessibilityObject(GetBookmarkBarView(),
- l10n_util::GetString(IDS_ACCNAME_BOOKMARKS),
- ROLE_SYSTEM_TOOLBAR);
+ TestViewAccessibilityObject(
+ GetBookmarkBarView(),
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_BOOKMARKS)),
+ ROLE_SYSTEM_TOOLBAR);
}
IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest,
TestAboutChromeViewAccObj) {
// Firstly, test that the WindowDelegate got updated.
views::Window* aboutChromeWindow = GetBrowserView()->ShowAboutChromeDialog();
- EXPECT_STREQ(aboutChromeWindow->GetDelegate()->GetWindowTitle().c_str(),
- l10n_util::GetString(IDS_ABOUT_CHROME_TITLE).c_str());
+ EXPECT_STREQ(
+ aboutChromeWindow->GetDelegate()->GetWindowTitle().c_str(),
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ABOUT_CHROME_TITLE)).c_str());
EXPECT_EQ(aboutChromeWindow->GetDelegate()->accessible_role(),
AccessibilityTypes::ROLE_DIALOG);
@@ -252,8 +263,10 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest,
ASSERT_EQ(S_OK, hr);
ASSERT_TRUE(NULL != acc_obj);
- TestAccessibilityInfo(acc_obj, l10n_util::GetString(IDS_ABOUT_CHROME_TITLE),
- ROLE_SYSTEM_DIALOG);
+ TestAccessibilityInfo(
+ acc_obj,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ABOUT_CHROME_TITLE)),
+ ROLE_SYSTEM_DIALOG);
acc_obj->Release();
}
diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc
index 848527a..9a58709 100644
--- a/chrome/browser/bookmarks/bookmark_model.cc
+++ b/chrome/browser/bookmarks/bookmark_model.cc
@@ -102,9 +102,8 @@ class SortComparator : public std::binary_function<const BookmarkNode*,
// Types are the same, compare the names.
if (!collator_)
return n1->GetTitle() < n2->GetTitle();
- return l10n_util::CompareStringWithCollator(collator_,
- UTF16ToWideHack(n1->GetTitle()), UTF16ToWideHack(n2->GetTitle())) ==
- UCOL_LESS;
+ return l10n_util::CompareString16WithCollator(
+ collator_, n1->GetTitle(), n2->GetTitle()) == UCOL_LESS;
}
// Types differ, sort such that folders come first.
return n1->is_folder();
diff --git a/chrome/browser/chromeos/login/login_screen.cc b/chrome/browser/chromeos/login/login_screen.cc
index 7d8fbba..515b7be 100644
--- a/chrome/browser/chromeos/login/login_screen.cc
+++ b/chrome/browser/chromeos/login/login_screen.cc
@@ -135,7 +135,7 @@ void LoginScreen::ShowError(int error_id, const std::string& details) {
BubbleBorder::LEFT_TOP,
ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING),
error_text,
- l10n_util::GetString(IDS_CANT_ACCESS_ACCOUNT_BUTTON),
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_CANT_ACCESS_ACCOUNT_BUTTON)),
this);
}
diff --git a/chrome/browser/chromeos/login/network_screen.cc b/chrome/browser/chromeos/login/network_screen.cc
index 3812181..579687e 100644
--- a/chrome/browser/chromeos/login/network_screen.cc
+++ b/chrome/browser/chromeos/login/network_screen.cc
@@ -157,10 +157,12 @@ void NetworkScreen::OnConnectionTimeout() {
network_control->GetScreenBounds(),
BubbleBorder::LEFT_TOP,
ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING),
- l10n_util::GetStringF(IDS_NETWORK_SELECTION_ERROR,
- l10n_util::GetString(IDS_PRODUCT_OS_NAME),
- UTF16ToWide(network_id_)),
- l10n_util::GetString(IDS_NETWORK_SELECTION_ERROR_HELP),
+ UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_NETWORK_SELECTION_ERROR,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_OS_NAME),
+ network_id_)),
+ UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_ERROR_HELP)),
this);
network_control->RequestFocus();
}
diff --git a/chrome/browser/chromeos/login/network_selection_view.cc b/chrome/browser/chromeos/login/network_selection_view.cc
index 04eb840..f4eb223 100644
--- a/chrome/browser/chromeos/login/network_selection_view.cc
+++ b/chrome/browser/chromeos/login/network_selection_view.cc
@@ -334,15 +334,16 @@ void NetworkSelectionView::UpdateLocalizedStrings() {
UTF16ToWide(delegate_->language_switch_menu()->GetCurrentLocaleName()));
keyboards_menubutton_->SetText(
UTF16ToWide(delegate_->keyboard_switch_menu()->GetCurrentKeyboardName()));
- welcome_label_->SetText(l10n_util::GetString(IDS_NETWORK_SELECTION_TITLE));
+ welcome_label_->SetText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_TITLE)));
select_language_label_->SetText(
- l10n_util::GetString(IDS_LANGUAGE_SELECTION_SELECT));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_LANGUAGE_SELECTION_SELECT)));
select_keyboard_label_->SetText(
- l10n_util::GetString(IDS_KEYBOARD_SELECTION_SELECT));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_KEYBOARD_SELECTION_SELECT)));
select_network_label_->SetText(
- l10n_util::GetString(IDS_NETWORK_SELECTION_SELECT));
- proxy_settings_link_->SetText(
- l10n_util::GetString(IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_SELECT)));
+ proxy_settings_link_->SetText(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON)));
RecreateNativeControls();
UpdateConnectingNetworkLabel();
network_dropdown_->Refresh();
@@ -448,13 +449,14 @@ void NetworkSelectionView::RecreateNativeControls() {
delete continue_button_;
continue_button_ = new login::WideButton(
delegate_,
- l10n_util::GetString(IDS_NETWORK_SELECTION_CONTINUE_BUTTON));
+ UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_CONTINUE_BUTTON)));
continue_button_->SetEnabled(is_continue_enabled);
}
void NetworkSelectionView::UpdateConnectingNetworkLabel() {
- connecting_network_label_->SetText(l10n_util::GetStringF(
- IDS_NETWORK_SELECTION_CONNECTING, UTF16ToWide(network_id_)));
+ connecting_network_label_->SetText(UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_NETWORK_SELECTION_CONNECTING, network_id_)));
}
} // namespace chromeos
diff --git a/chrome/browser/chromeos/login/new_user_view.cc b/chrome/browser/chromeos/login/new_user_view.cc
index d160949..cd2508c 100644
--- a/chrome/browser/chromeos/login/new_user_view.cc
+++ b/chrome/browser/chromeos/login/new_user_view.cc
@@ -277,20 +277,23 @@ void NewUserView::AddChildView(View* view) {
}
void NewUserView::UpdateLocalizedStrings() {
- title_label_->SetText(l10n_util::GetString(IDS_LOGIN_TITLE));
- title_hint_label_->SetText(l10n_util::GetString(IDS_LOGIN_TITLE_HINT));
+ title_label_->SetText(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_LOGIN_TITLE)));
+ title_hint_label_->SetText(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_LOGIN_TITLE_HINT)));
username_field_->set_text_to_display_when_empty(
l10n_util::GetStringUTF16(IDS_LOGIN_USERNAME));
password_field_->set_text_to_display_when_empty(
l10n_util::GetStringUTF16(IDS_LOGIN_PASSWORD));
- sign_in_button_->SetLabel(l10n_util::GetString(IDS_LOGIN_BUTTON));
+ sign_in_button_->SetLabel(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_LOGIN_BUTTON)));
if (need_create_account_) {
create_account_link_->SetText(
- l10n_util::GetString(IDS_CREATE_ACCOUNT_BUTTON));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_CREATE_ACCOUNT_BUTTON)));
}
if (need_guest_link_) {
- guest_link_->SetText(
- l10n_util::GetString(IDS_BROWSE_WITHOUT_SIGNING_IN_BUTTON));
+ guest_link_->SetText(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_BROWSE_WITHOUT_SIGNING_IN_BUTTON)));
}
delegate_->ClearErrors();
languages_menubutton_->SetText(
diff --git a/chrome/browser/chromeos/login/oobe_progress_bar.cc b/chrome/browser/chromeos/login/oobe_progress_bar.cc
index 8fddc40..82b50de 100644
--- a/chrome/browser/chromeos/login/oobe_progress_bar.cc
+++ b/chrome/browser/chromeos/login/oobe_progress_bar.cc
@@ -7,6 +7,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/logging.h"
+#include "base/utf_string_conversions.h"
#include "gfx/canvas_skia.h"
#include "grit/theme_resources.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -110,7 +111,7 @@ void OobeProgressBar::Paint(gfx::Canvas* canvas) {
next_x - ix, line_->height());
}
- std::wstring str = l10n_util::GetString(steps_[i]);
+ std::wstring str = UTF16ToWide(l10n_util::GetStringUTF16(steps_[i]));
canvas->DrawStringInt(str, font_, color,
x + kTextPadding, y + dot->height() + kTextPadding,
(next_x - x - 2 * kTextPadding),
diff --git a/chrome/browser/chromeos/login/password_changed_view.cc b/chrome/browser/chromeos/login/password_changed_view.cc
index 5a1d2d0..3c3b835 100644
--- a/chrome/browser/chromeos/login/password_changed_view.cc
+++ b/chrome/browser/chromeos/login/password_changed_view.cc
@@ -59,7 +59,8 @@ views::View* PasswordChangedView::GetInitiallyFocusedView() {
}
std::wstring PasswordChangedView::GetWindowTitle() const {
- return l10n_util::GetString(IDS_LOGIN_PASSWORD_CHANGED_DIALOG_BOX_TITLE);
+ return UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_LOGIN_PASSWORD_CHANGED_DIALOG_BOX_TITLE));
}
gfx::Size PasswordChangedView::GetPreferredSize() {
@@ -86,22 +87,26 @@ void PasswordChangedView::Init() {
// Create controls
title_label_ = new Label();
title_label_->SetFont(title_font);
- title_label_->SetText(l10n_util::GetString(IDS_LOGIN_PASSWORD_CHANGED_TITLE));
+ title_label_->SetText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_LOGIN_PASSWORD_CHANGED_TITLE)));
title_label_->SetHorizontalAlignment(Label::ALIGN_LEFT);
description_label_ = new Label();
description_label_->SetText(
- l10n_util::GetString(IDS_LOGIN_PASSWORD_CHANGED_DESC));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_LOGIN_PASSWORD_CHANGED_DESC)));
description_label_->SetMultiLine(true);
description_label_->SetHorizontalAlignment(Label::ALIGN_LEFT);
full_sync_radio_ = new RadioButton(
- l10n_util::GetString(IDS_LOGIN_PASSWORD_CHANGED_RESET), 0);
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_LOGIN_PASSWORD_CHANGED_RESET)),
+ 0);
full_sync_radio_->set_listener(this);
full_sync_radio_->SetMultiLine(true);
delta_sync_radio_ = new RadioButton(
- l10n_util::GetString(IDS_LOGIN_PASSWORD_CHANGED_MIGRATE), 0);
+ UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_LOGIN_PASSWORD_CHANGED_MIGRATE)),
+ 0);
delta_sync_radio_->set_listener(this);
delta_sync_radio_->SetMultiLine(true);
diff --git a/chrome/browser/chromeos/login/screen_locker.cc b/chrome/browser/chromeos/login/screen_locker.cc
index d927935..09de9ef 100644
--- a/chrome/browser/chromeos/login/screen_locker.cc
+++ b/chrome/browser/chromeos/login/screen_locker.cc
@@ -759,17 +759,18 @@ void ScreenLocker::OnLoginFailure(const LoginFailure& error) {
// Don't enable signout button here as we're showing
// MessageBubble.
- std::wstring msg = l10n_util::GetString(IDS_LOGIN_ERROR_AUTHENTICATING);
+ string16 msg = l10n_util::GetStringUTF16(IDS_LOGIN_ERROR_AUTHENTICATING);
const std::string error_text = error.GetErrorString();
if (!error_text.empty())
- msg += L"\n" + ASCIIToWide(error_text);
+ msg += ASCIIToUTF16("\n") + ASCIIToUTF16(error_text);
InputMethodLibrary* input_method_library =
CrosLibrary::Get()->GetInputMethodLibrary();
if (input_method_library->GetNumActiveInputMethods() > 1)
- msg += L"\n" + l10n_util::GetString(IDS_LOGIN_ERROR_KEYBOARD_SWITCH_HINT);
+ msg += ASCIIToUTF16("\n") +
+ l10n_util::GetStringUTF16(IDS_LOGIN_ERROR_KEYBOARD_SWITCH_HINT);
- ShowErrorBubble(msg, BubbleBorder::BOTTOM_LEFT);
+ ShowErrorBubble(UTF16ToWide(msg), BubbleBorder::BOTTOM_LEFT);
}
void ScreenLocker::OnLoginSuccess(
diff --git a/chrome/browser/chromeos/login/update_view.cc b/chrome/browser/chromeos/login/update_view.cc
index fc07489..7a56be2 100644
--- a/chrome/browser/chromeos/login/update_view.cc
+++ b/chrome/browser/chromeos/login/update_view.cc
@@ -8,6 +8,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/chromeos/login/helper.h"
#include "chrome/browser/chromeos/login/rounded_rect_painter.h"
#include "chrome/browser/chromeos/login/update_screen.h"
@@ -105,12 +106,15 @@ void UpdateView::Reset() {
}
void UpdateView::UpdateLocalizedStrings() {
- installing_updates_label_->SetText(
- l10n_util::GetStringF(IDS_INSTALLING_UPDATE,
- l10n_util::GetString(IDS_PRODUCT_OS_NAME)));
- reboot_label_->SetText(l10n_util::GetString(IDS_INSTALLING_UPDATE_DESC));
- manual_reboot_label_->SetText(l10n_util::GetString(IDS_UPDATE_COMPLETED));
- checking_label_->SetText(l10n_util::GetString(IDS_CHECKING_FOR_UPDATES));
+ installing_updates_label_->SetText(UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_INSTALLING_UPDATE,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_OS_NAME))));
+ reboot_label_->SetText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_INSTALLING_UPDATE_DESC)));
+ manual_reboot_label_->SetText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_UPDATE_COMPLETED)));
+ checking_label_->SetText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_CHECKING_FOR_UPDATES)));
}
void UpdateView::AddProgress(int ticks) {
diff --git a/chrome/browser/chromeos/login/user_controller.cc b/chrome/browser/chromeos/login/user_controller.cc
index 888803a..d5d14dd 100644
--- a/chrome/browser/chromeos/login/user_controller.cc
+++ b/chrome/browser/chromeos/login/user_controller.cc
@@ -192,9 +192,9 @@ void UserController::StopThrobber() {
std::wstring UserController::GetNameTooltip() const {
if (is_new_user_)
- return l10n_util::GetString(IDS_ADD_USER);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_ADD_USER));
if (is_guest_)
- return l10n_util::GetString(IDS_GO_INCOGNITO_BUTTON);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_GO_INCOGNITO_BUTTON));
// Tooltip contains user's display name and his email domain to distinguish
// this user from the other one with the same display name.
@@ -415,12 +415,12 @@ WidgetGtk* UserController::CreateLabelWindow(int index,
kUnselectedUsernameFontDelta, gfx::Font::BOLD);
std::wstring text;
if (is_guest_) {
- text = l10n_util::GetString(IDS_GUEST);
+ text = UTF16ToWide(l10n_util::GetStringUTF16(IDS_GUEST));
} else if (is_new_user_) {
// Add user should have label only in activated state.
// When new user is the only, label is not needed.
if (type == WM_IPC_WINDOW_LOGIN_LABEL && index != 0)
- text = l10n_util::GetString(IDS_ADD_USER);
+ text = UTF16ToWide(l10n_util::GetStringUTF16(IDS_ADD_USER));
} else {
text = UTF8ToWide(user_.GetDisplayName());
}
diff --git a/chrome/browser/chromeos/login/user_controller_unittest.cc b/chrome/browser/chromeos/login/user_controller_unittest.cc
index 379e4fe..3cf7ce4 100644
--- a/chrome/browser/chromeos/login/user_controller_unittest.cc
+++ b/chrome/browser/chromeos/login/user_controller_unittest.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/chromeos/login/user_controller.h"
#include "app/l10n_util.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/chromeos/login/user_manager.h"
#include "grit/generated_resources.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -13,11 +14,11 @@ namespace chromeos {
TEST(UserControllerTest, GetNameTooltip) {
UserController guest_user_controller(NULL, false);
- EXPECT_EQ(l10n_util::GetString(IDS_ADD_USER),
+ EXPECT_EQ(UTF16ToWide(l10n_util::GetStringUTF16(IDS_ADD_USER)),
guest_user_controller.GetNameTooltip());
UserController new_user_controller(NULL, true);
- EXPECT_EQ(l10n_util::GetString(IDS_GO_INCOGNITO_BUTTON),
+ EXPECT_EQ(UTF16ToWide(l10n_util::GetStringUTF16(IDS_GO_INCOGNITO_BUTTON)),
new_user_controller.GetNameTooltip());
UserManager::User existing_user;
diff --git a/chrome/browser/chromeos/login/user_image_view.cc b/chrome/browser/chromeos/login/user_image_view.cc
index 5ef45a6..b8545cf 100644
--- a/chrome/browser/chromeos/login/user_image_view.cc
+++ b/chrome/browser/chromeos/login/user_image_view.cc
@@ -9,6 +9,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/callback.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/chromeos/login/helper.h"
#include "chrome/browser/chromeos/login/rounded_rect_painter.h"
#include "chrome/browser/chromeos/login/wizard_accessibility_helper.h"
@@ -87,7 +88,7 @@ class CameraImageView : public views::ImageView {
void SetErrorState() {
HideThrobber();
- SetMessage(l10n_util::GetString(IDS_USER_IMAGE_NO_VIDEO));
+ SetMessage(UTF16ToWide(l10n_util::GetStringUTF16(IDS_USER_IMAGE_NO_VIDEO)));
SetImage(
ResourceBundle::GetSharedInstance().GetBitmapNamed(
IDR_USER_IMAGE_NO_VIDEO));
@@ -168,8 +169,8 @@ void UserImageView::Init() {
&BorderDefinition::kScreenBorder);
set_background(views::Background::CreateBackgroundPainter(true, painter));
- title_label_ =
- new views::Label(l10n_util::GetString(IDS_USER_IMAGE_SCREEN_TITLE));
+ title_label_ = new views::Label(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_USER_IMAGE_SCREEN_TITLE)));
title_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
title_label_->SetMultiLine(true);
CorrectLabelFontSize(title_label_);
@@ -188,10 +189,12 @@ void UserImageView::Init() {
ResourceBundle::GetSharedInstance().GetBitmapNamed(
IDR_USER_IMAGE_CAPTURE_DISABLED));
- ok_button_ = new login::WideButton(this, l10n_util::GetString(IDS_OK));
+ ok_button_ = new login::WideButton(
+ this, UTF16ToWide(l10n_util::GetStringUTF16(IDS_OK)));
ok_button_->SetEnabled(!is_capturing_);
- skip_button_ = new login::WideButton(this, l10n_util::GetString(IDS_SKIP));
+ skip_button_ = new login::WideButton(
+ this, UTF16ToWide(l10n_util::GetStringUTF16(IDS_SKIP)));
skip_button_->SetEnabled(true);
InitLayout();
diff --git a/chrome/browser/chromeos/login/user_view.cc b/chrome/browser/chromeos/login/user_view.cc
index e359251..980f107 100644
--- a/chrome/browser/chromeos/login/user_view.cc
+++ b/chrome/browser/chromeos/login/user_view.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/chromeos/login/helper.h"
#include "chrome/browser/chromeos/login/rounded_rect_painter.h"
#include "chrome/browser/chromeos/login/rounded_view.h"
@@ -75,12 +76,12 @@ class SignoutView : public views::View {
const gfx::Font& font = rb.GetFont(ResourceBundle::SmallFont);
active_user_label_ = new views::Label(
- l10n_util::GetString(IDS_SCREEN_LOCK_ACTIVE_USER));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_SCREEN_LOCK_ACTIVE_USER)));
active_user_label_->SetFont(font);
active_user_label_->SetColor(kTextColor);
signout_link_ = new views::Link(
- l10n_util::GetString(IDS_SCREEN_LOCK_SIGN_OUT));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_SCREEN_LOCK_SIGN_OUT)));
signout_link_->SetController(link_controller);
signout_link_->SetFont(font);
signout_link_->SetColor(kTextColor);
@@ -282,7 +283,7 @@ void UserView::Init(bool need_background) {
remove_button_ = new RemoveButton(
this,
*rb.GetBitmapNamed(IDR_CLOSE_BAR_H),
- l10n_util::GetString(IDS_LOGIN_REMOVE),
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_LOGIN_REMOVE)),
gfx::Point(kUserImageSize - kRemoveButtonPadding, kRemoveButtonPadding));
remove_button_->SetVisible(false);
AddChildView(remove_button_);
@@ -332,7 +333,8 @@ void UserView::ButtonPressed(views::Button* sender, const views::Event& event) {
}
void UserView::OnLocaleChanged() {
- remove_button_->SetText(l10n_util::GetString(IDS_LOGIN_REMOVE));
+ remove_button_->SetText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_LOGIN_REMOVE)));
}
} // namespace chromeos
diff --git a/chrome/browser/chromeos/login/web_page_view.cc b/chrome/browser/chromeos/login/web_page_view.cc
index 2d5e4de..1bd24ac 100644
--- a/chrome/browser/chromeos/login/web_page_view.cc
+++ b/chrome/browser/chromeos/login/web_page_view.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/string_util.h"
#include "base/time.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/child_process_security_policy.h"
#include "chrome/browser/chromeos/login/helper.h"
#include "chrome/browser/chromeos/login/rounded_rect_painter.h"
@@ -116,7 +117,8 @@ void WebPageView::Init() {
AddChildView(throbber_);
connecting_label_ = new views::Label();
- connecting_label_->SetText(l10n_util::GetString(IDS_LOAD_STATE_CONNECTING));
+ connecting_label_->SetText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_LOAD_STATE_CONNECTING)));
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
connecting_label_->SetFont(rb.GetFont(ResourceBundle::MediumFont));
connecting_label_->SetVisible(false);
diff --git a/chrome/browser/chromeos/login/wizard_controller_browsertest.cc b/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
index 7d8121b..af8301a 100644
--- a/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
+++ b/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "app/l10n_util.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/login/account_screen.h"
#include "chrome/browser/chromeos/login/eula_view.h"
@@ -80,13 +81,15 @@ IN_PROC_BROWSER_TEST_F(WizardControllerTest, FAILS_SwitchLanguage) {
EXPECT_EQ("en-US", g_browser_process->GetApplicationLocale());
EXPECT_STREQ("en", icu::Locale::getDefault().getLanguage());
EXPECT_FALSE(base::i18n::IsRTL());
- const std::wstring en_str = l10n_util::GetString(IDS_NETWORK_SELECTION_TITLE);
+ const std::wstring en_str =
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_TITLE));
chromeos::LanguageSwitchMenu::SwitchLanguage("fr");
EXPECT_EQ("fr", g_browser_process->GetApplicationLocale());
EXPECT_STREQ("fr", icu::Locale::getDefault().getLanguage());
EXPECT_FALSE(base::i18n::IsRTL());
- const std::wstring fr_str = l10n_util::GetString(IDS_NETWORK_SELECTION_TITLE);
+ const std::wstring fr_str =
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_TITLE));
EXPECT_NE(en_str, fr_str);
@@ -94,7 +97,8 @@ IN_PROC_BROWSER_TEST_F(WizardControllerTest, FAILS_SwitchLanguage) {
EXPECT_EQ("ar", g_browser_process->GetApplicationLocale());
EXPECT_STREQ("ar", icu::Locale::getDefault().getLanguage());
EXPECT_TRUE(base::i18n::IsRTL());
- const std::wstring ar_str = l10n_util::GetString(IDS_NETWORK_SELECTION_TITLE);
+ const std::wstring ar_str =
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_TITLE));
EXPECT_NE(fr_str, ar_str);
}
diff --git a/chrome/browser/chromeos/options/internet_page_view.cc b/chrome/browser/chromeos/options/internet_page_view.cc
index bf5d77e..880ac05 100644
--- a/chrome/browser/chromeos/options/internet_page_view.cc
+++ b/chrome/browser/chromeos/options/internet_page_view.cc
@@ -179,28 +179,28 @@ void NetworkSection::AddNetwork(int id, const SkBitmap& icon,
if (button_flags & FORGET_BUTTON) {
views::NativeButton* button = new views::NativeButton(this,
- l10n_util::GetString(IDS_OPTIONS_SETTINGS_FORGET));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_FORGET)));
button->set_tag(id + kButtonIdOffset * FORGET_BUTTON);
layout_->AddView(button, 1, 2);
}
if (button_flags & DISCONNECT_BUTTON) {
- views::NativeButton* button = new views::NativeButton(this,
- l10n_util::GetString(IDS_OPTIONS_SETTINGS_DISCONNECT));
+ views::NativeButton* button = new views::NativeButton(this, UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_DISCONNECT)));
button->set_tag(id + kButtonIdOffset * DISCONNECT_BUTTON);
layout_->AddView(button, 1, 2);
}
if (button_flags & CONNECT_BUTTON) {
views::NativeButton* button = new views::NativeButton(this,
- l10n_util::GetString(IDS_OPTIONS_SETTINGS_CONNECT));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_CONNECT)));
button->set_tag(id + kButtonIdOffset * CONNECT_BUTTON);
layout_->AddView(button, 1, 2);
}
if (button_flags & OPTIONS_BUTTON) {
views::NativeButton* button = new views::NativeButton(this,
- l10n_util::GetString(IDS_OPTIONS_SETTINGS_OPTIONS));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_OPTIONS)));
button->set_tag(id + kButtonIdOffset * OPTIONS_BUTTON);
layout_->AddView(button, 1, 2);
}
@@ -254,8 +254,8 @@ void WiredSection::InitSection() {
*rb.GetBitmapNamed(IDR_STATUSBAR_NETWORK_DISCONNECTED));
}
- std::wstring name =
- l10n_util::GetString(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET);
+ std::wstring name = UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET));
int s = IDS_STATUSBAR_NETWORK_DEVICE_DISABLED;
if (cros->ethernet_connecting())
@@ -264,7 +264,7 @@ void WiredSection::InitSection() {
s = IDS_STATUSBAR_NETWORK_DEVICE_CONNECTED;
else if (cros->ethernet_enabled())
s = IDS_STATUSBAR_NETWORK_DEVICE_DISCONNECTED;
- std::wstring status = l10n_util::GetString(s);
+ std::wstring status = UTF16ToWide(l10n_util::GetStringUTF16(s));
int flags = cros->ethernet_connected() ? OPTIONS_BUTTON : 0;
bool bold = cros->ethernet_connected() ? true : false;
@@ -399,7 +399,7 @@ void WirelessSection::AddWirelessNetwork(int id, const SkBitmap& icon,
s = IDS_STATUSBAR_NETWORK_DEVICE_CONNECTING;
else if (connected)
s = IDS_STATUSBAR_NETWORK_DEVICE_CONNECTED;
- std::wstring status = l10n_util::GetString(s);
+ std::wstring status = UTF16ToWide(l10n_util::GetStringUTF16(s));
int flags = 0;
if (connected) {
diff --git a/chrome/browser/chromeos/options/language_chewing_config_view.cc b/chrome/browser/chromeos/options/language_chewing_config_view.cc
index 0d1f31a..4aae92d 100644
--- a/chrome/browser/chromeos/options/language_chewing_config_view.cc
+++ b/chrome/browser/chromeos/options/language_chewing_config_view.cc
@@ -115,14 +115,14 @@ int LanguageChewingConfigView::GetDialogButtons() const {
std::wstring LanguageChewingConfigView::GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const {
if (button == MessageBoxFlags::DIALOGBUTTON_OK) {
- return l10n_util::GetString(IDS_OK);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_OK));
}
return L"";
}
std::wstring LanguageChewingConfigView::GetWindowTitle() const {
- return l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTINGS_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_LANGUAGES_CHEWING_SETTINGS_TITLE));
}
gfx::Size LanguageChewingConfigView::GetPreferredSize() {
@@ -153,8 +153,8 @@ void LanguageChewingConfigView::InitControlLayout() {
for (size_t i = 0; i < language_prefs::kNumChewingBooleanPrefs; ++i) {
chewing_boolean_checkboxes_[i] = new views::Checkbox(
- l10n_util::GetString(
- language_prefs::kChewingBooleanPrefs[i].message_id));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ language_prefs::kChewingBooleanPrefs[i].message_id)));
chewing_boolean_checkboxes_[i]->set_listener(this);
chewing_boolean_checkboxes_[i]->set_tag(i);
}
@@ -185,8 +185,8 @@ void LanguageChewingConfigView::InitControlLayout() {
for (size_t i = 0; i < language_prefs::kNumChewingIntegerPrefs; ++i) {
layout->StartRow(0, kColumnSetId);
layout->AddView(new views::Label(
- l10n_util::GetString(
- language_prefs::kChewingIntegerPrefs[i].message_id)));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ language_prefs::kChewingIntegerPrefs[i].message_id))));
layout->AddView(chewing_integer_sliders_[i]);
}
NotifyPrefChanged();
diff --git a/chrome/browser/chromeos/options/language_config_util.h b/chrome/browser/chromeos/options/language_config_util.h
index 6f262cf..808fefc 100644
--- a/chrome/browser/chromeos/options/language_config_util.h
+++ b/chrome/browser/chromeos/options/language_config_util.h
@@ -51,7 +51,7 @@ class LanguageComboboxModel : public ComboboxModel {
// Gets a label for the combobox like "Input mode". This function is NOT part
// of the ComboboxModel interface.
std::wstring GetLabel() const {
- return l10n_util::GetString(pref_data_->label_message_id);
+ return UTF16ToWide(l10n_util::GetStringUTF16(pref_data_->label_message_id));
}
// Gets a config value for the ibus configuration daemon (e.g. "KUTEN_TOUTEN",
diff --git a/chrome/browser/chromeos/options/language_config_view.cc b/chrome/browser/chromeos/options/language_config_view.cc
index 2e5e56c..5e6716a 100644
--- a/chrome/browser/chromeos/options/language_config_view.cc
+++ b/chrome/browser/chromeos/options/language_config_view.cc
@@ -180,14 +180,14 @@ void LanguageConfigView::ButtonPressed(
std::wstring LanguageConfigView::GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const {
if (button == MessageBoxFlags::DIALOGBUTTON_OK) {
- return l10n_util::GetString(IDS_DONE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_DONE));
}
return L"";
}
std::wstring LanguageConfigView::GetWindowTitle() const {
- return l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_LANGUAGES_DIALOG_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_LANGUAGES_DIALOG_TITLE));
}
void LanguageConfigView::Layout() {
@@ -466,8 +466,8 @@ views::View* LanguageConfigView::CreateContentsOnBottom() {
// Create the remove button.
remove_language_button_ = new views::NativeButton(
- this, l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_LANGUAGES_REMOVE_BUTTON));
+ this, UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_LANGUAGES_REMOVE_BUTTON)));
remove_language_button_->set_tag(kRemoveLanguageButton);
// Add the add and remove buttons.
@@ -530,14 +530,14 @@ void LanguageConfigView::AddUiLanguageSection(const std::string& language_code,
if (application_locale == language_code) {
layout->AddView(
new views::Label(
- l10n_util::GetStringF(
+ UTF16ToWide(l10n_util::GetStringFUTF16(
IDS_OPTIONS_SETTINGS_LANGUAGES_IS_DISPLAYED_IN_THIS_LANGUAGE,
- l10n_util::GetString(IDS_PRODUCT_OS_NAME))));
+ l10n_util::GetStringUTF16(IDS_PRODUCT_OS_NAME)))));
} else {
UiLanguageButton* button = new UiLanguageButton(
- this, l10n_util::GetStringF(
+ this, UTF16ToWide(l10n_util::GetStringFUTF16(
IDS_OPTIONS_SETTINGS_LANGUAGES_DISPLAY_IN_THIS_LANGUAGE,
- l10n_util::GetString(IDS_PRODUCT_OS_NAME)),
+ l10n_util::GetStringUTF16(IDS_PRODUCT_OS_NAME))),
language_code);
button->set_tag(kChangeUiLanguageButton);
layout->AddView(button);
@@ -549,8 +549,8 @@ void LanguageConfigView::AddInputMethodSection(
views::GridLayout* layout) {
// Create the input method title label.
views::Label* input_method_title_label = new views::Label(
- l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD)));
input_method_title_label->SetFont(
input_method_title_label->font().DeriveFont(0, gfx::Font::BOLD));
@@ -587,7 +587,8 @@ void LanguageConfigView::AddInputMethodSection(
if (input_method_config_view_map_.count(input_method_id) > 0) {
InputMethodButton* button = new InputMethodButton(
this,
- l10n_util::GetString(IDS_OPTIONS_SETTINGS_LANGUAGES_CONFIGURE),
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_LANGUAGES_CONFIGURE)),
input_method_id);
button->set_tag(kConfigureInputMethodButton);
layout->AddView(button);
diff --git a/chrome/browser/chromeos/options/language_hangul_config_view.cc b/chrome/browser/chromeos/options/language_hangul_config_view.cc
index e65569b..a7f0b70 100644
--- a/chrome/browser/chromeos/options/language_hangul_config_view.cc
+++ b/chrome/browser/chromeos/options/language_hangul_config_view.cc
@@ -111,14 +111,14 @@ int LanguageHangulConfigView::GetDialogButtons() const {
std::wstring LanguageHangulConfigView::GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const {
if (button == MessageBoxFlags::DIALOGBUTTON_OK) {
- return l10n_util::GetString(IDS_OK);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_OK));
}
return L"";
}
std::wstring LanguageHangulConfigView::GetWindowTitle() const {
- return l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_TITLE));
}
gfx::Size LanguageHangulConfigView::GetPreferredSize() {
@@ -150,8 +150,8 @@ void LanguageHangulConfigView::InitControlLayout() {
layout->StartRow(0, kColumnSetId);
// Settings for the Hangul IME.
- layout->AddView(new views::Label(
- l10n_util::GetString(IDS_OPTIONS_SETTINGS_KEYBOARD_LAYOUT_TEXT)));
+ layout->AddView(new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_KEYBOARD_LAYOUT_TEXT))));
hangul_keyboard_combobox_
= new views::Combobox(hangul_keyboard_combobox_model_.get());
diff --git a/chrome/browser/chromeos/options/language_mozc_config_view.cc b/chrome/browser/chromeos/options/language_mozc_config_view.cc
index 13d5267..16ffe1c 100644
--- a/chrome/browser/chromeos/options/language_mozc_config_view.cc
+++ b/chrome/browser/chromeos/options/language_mozc_config_view.cc
@@ -122,14 +122,14 @@ int LanguageMozcConfigView::GetDialogButtons() const {
std::wstring LanguageMozcConfigView::GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const {
if (button == MessageBoxFlags::DIALOGBUTTON_OK) {
- return l10n_util::GetString(IDS_OK);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_OK));
}
return L"";
}
std::wstring LanguageMozcConfigView::GetWindowTitle() const {
- return l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SETTINGS_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_SETTINGS_TITLE));
}
gfx::Size LanguageMozcConfigView::GetPreferredSize() {
@@ -166,8 +166,9 @@ void LanguageMozcConfigView::InitControlLayout() {
for (size_t i = 0; i < language_prefs::kNumMozcBooleanPrefs; ++i) {
MozcPrefAndAssociatedCheckbox& current = prefs_and_checkboxes_[i];
- current.checkbox = new views::Checkbox(
- l10n_util::GetString(language_prefs::kMozcBooleanPrefs[i].message_id));
+ current.checkbox = new views::Checkbox(UTF16ToWide(
+ l10n_util::GetStringUTF16(
+ language_prefs::kMozcBooleanPrefs[i].message_id)));
current.checkbox->set_listener(this);
current.checkbox->set_tag(i);
}
@@ -190,8 +191,8 @@ void LanguageMozcConfigView::InitControlLayout() {
NotifyPrefChanged(); // Sync the comboboxes with current Chrome prefs.
reset_to_defaults_button_ = new views::NativeButton(
- this, l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_RESET_TO_DEFAULTS_BUTTON));
+ this, UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_LANGUAGES_MOZC_RESET_TO_DEFAULTS_BUTTON)));
reset_to_defaults_button_->set_tag(kResetToDefaultsButton);
layout->StartRow(0, kColumnSetId);
layout->AddView(reset_to_defaults_button_);
@@ -213,8 +214,8 @@ void LanguageMozcConfigView::InitControlLayout() {
const MozcPrefAndAssociatedSlider& current = prefs_and_sliders_[i];
layout->StartRow(0, kColumnSetId);
layout->AddView(new views::Label(
- l10n_util::GetString(
- language_prefs::kMozcIntegerPrefs[i].message_id)));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ language_prefs::kMozcIntegerPrefs[i].message_id))));
layout->AddView(current.slider);
}
NotifyPrefChanged(); // Sync the slider with current Chrome prefs.
diff --git a/chrome/browser/chromeos/options/language_pinyin_config_view.cc b/chrome/browser/chromeos/options/language_pinyin_config_view.cc
index 881d31a..ce627b0 100644
--- a/chrome/browser/chromeos/options/language_pinyin_config_view.cc
+++ b/chrome/browser/chromeos/options/language_pinyin_config_view.cc
@@ -76,14 +76,14 @@ int LanguagePinyinConfigView::GetDialogButtons() const {
std::wstring LanguagePinyinConfigView::GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const {
if (button == MessageBoxFlags::DIALOGBUTTON_OK) {
- return l10n_util::GetString(IDS_OK);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_OK));
}
return L"";
}
std::wstring LanguagePinyinConfigView::GetWindowTitle() const {
- return l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTINGS_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_LANGUAGES_PINYIN_SETTINGS_TITLE));
}
gfx::Size LanguagePinyinConfigView::GetPreferredSize() {
@@ -115,8 +115,8 @@ void LanguagePinyinConfigView::InitControlLayout() {
for (size_t i = 0; i < language_prefs::kNumPinyinBooleanPrefs; ++i) {
pinyin_boolean_checkboxes_[i] = new views::Checkbox(
- l10n_util::GetString(
- language_prefs::kPinyinBooleanPrefs[i].message_id));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ language_prefs::kPinyinBooleanPrefs[i].message_id)));
pinyin_boolean_checkboxes_[i]->set_listener(this);
pinyin_boolean_checkboxes_[i]->set_tag(i);
}
diff --git a/chrome/browser/chromeos/options/network_config_view.cc b/chrome/browser/chromeos/options/network_config_view.cc
index c35be1a..45c1ec3 100644
--- a/chrome/browser/chromeos/options/network_config_view.cc
+++ b/chrome/browser/chromeos/options/network_config_view.cc
@@ -31,7 +31,8 @@ NetworkConfigView::NetworkConfigView(const WifiNetwork* wifi)
NetworkConfigView::NetworkConfigView()
: browser_mode_(true),
- title_(l10n_util::GetString(IDS_OPTIONS_SETTINGS_OTHER_NETWORKS)),
+ title_(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_OTHER_NETWORKS))),
wificonfig_view_(new WifiConfigView(this)),
delegate_(NULL) {
}
@@ -43,7 +44,7 @@ gfx::NativeWindow NetworkConfigView::GetNativeWindow() const {
std::wstring NetworkConfigView::GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const {
if (button == MessageBoxFlags::DIALOGBUTTON_OK)
- return l10n_util::GetString(IDS_OPTIONS_SETTINGS_CONNECT);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_CONNECT));
return std::wstring();
}
diff --git a/chrome/browser/chromeos/options/options_window_view.cc b/chrome/browser/chromeos/options/options_window_view.cc
index 087a09a..320bec6 100644
--- a/chrome/browser/chromeos/options/options_window_view.cc
+++ b/chrome/browser/chromeos/options/options_window_view.cc
@@ -213,8 +213,9 @@ void OptionsWindowView::ShowOptionsPage(OptionsPage page,
// OptionsWindowView, views::DialogDelegate implementation:
std::wstring OptionsWindowView::GetWindowTitle() const {
- return l10n_util::GetStringF(IDS_OPTIONS_DIALOG_TITLE,
- l10n_util::GetString(IDS_PRODUCT_NAME));
+ return UTF16ToWide(
+ l10n_util::GetStringFUTF16(IDS_OPTIONS_DIALOG_TITLE,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
}
void OptionsWindowView::WindowClosing() {
@@ -300,30 +301,35 @@ void OptionsWindowView::Init() {
system_page->set_background(views::Background::CreateSolidBackground(
SK_ColorWHITE));
tabs_->AddTabAtIndex(tab_index++,
- l10n_util::GetString(IDS_OPTIONS_SYSTEM_TAB_LABEL),
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SYSTEM_TAB_LABEL)),
system_page, false);
InternetPageView* internet_page = new InternetPageView(profile_);
internet_page->set_background(views::Background::CreateSolidBackground(
SK_ColorWHITE));
tabs_->AddTabAtIndex(tab_index++,
- l10n_util::GetString(IDS_OPTIONS_INTERNET_TAB_LABEL),
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_INTERNET_TAB_LABEL)),
internet_page, false);
tabs_->AddTabAtIndex(tab_index++,
- l10n_util::GetString(IDS_OPTIONS_GENERAL_TAB_LABEL),
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_GENERAL_TAB_LABEL)),
new GtkPreferencePageHost(
general_page_.get_page_widget()),
false);
tabs_->AddTabAtIndex(tab_index++,
- l10n_util::GetString(IDS_OPTIONS_CONTENT_TAB_LABEL),
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_CONTENT_TAB_LABEL)),
new GtkPreferencePageHost(
content_page_.get_page_widget()),
false);
tabs_->AddTabAtIndex(tab_index++,
- l10n_util::GetString(IDS_OPTIONS_ADVANCED_TAB_LABEL),
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_ADVANCED_TAB_LABEL)),
new GtkPreferencePageHost(
advanced_page_.get_page_widget()),
false);
diff --git a/chrome/browser/chromeos/options/settings_page_view.cc b/chrome/browser/chromeos/options/settings_page_view.cc
index 84d9654..b4b9d73 100644
--- a/chrome/browser/chromeos/options/settings_page_view.cc
+++ b/chrome/browser/chromeos/options/settings_page_view.cc
@@ -7,6 +7,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "gfx/skia_utils_gtk.h"
#include "views/controls/label.h"
#include "views/fill_layout.h"
@@ -66,7 +67,7 @@ void SettingsPageSection::InitControlLayout() {
layout->StartRow(0, single_column_layout_id);
views::Label* title_label = new views::Label(
- l10n_util::GetString(title_msg_id_));
+ UTF16ToWide(l10n_util::GetStringUTF16(title_msg_id_)));
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
gfx::Font title_font =
rb.GetFont(ResourceBundle::BaseFont).DeriveFont(0, gfx::Font::BOLD);
diff --git a/chrome/browser/chromeos/options/system_page_view.cc b/chrome/browser/chromeos/options/system_page_view.cc
index 5920f82..a314679 100644
--- a/chrome/browser/chromeos/options/system_page_view.cc
+++ b/chrome/browser/chromeos/options/system_page_view.cc
@@ -192,8 +192,8 @@ void DateTimeSection::InitContents(GridLayout* layout) {
timezone_combobox_->set_listener(this);
layout->StartRow(0, double_column_view_set_id());
- layout->AddView(new views::Label(
- l10n_util::GetString(IDS_OPTIONS_SETTINGS_TIMEZONE_DESCRIPTION)));
+ layout->AddView(new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_TIMEZONE_DESCRIPTION))));
layout->AddView(timezone_combobox_);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
@@ -265,8 +265,9 @@ void TouchpadSection::SliderValueChanged(views::Slider* sender) {
}
void TouchpadSection::InitContents(GridLayout* layout) {
- enable_tap_to_click_checkbox_ = new views::Checkbox(l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_TAP_TO_CLICK_ENABLED_DESCRIPTION));
+ enable_tap_to_click_checkbox_ =
+ new views::Checkbox(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_TAP_TO_CLICK_ENABLED_DESCRIPTION)));
enable_tap_to_click_checkbox_->set_listener(this);
enable_tap_to_click_checkbox_->SetMultiLine(true);
// Create sensitivity slider with values between 1 and 5 step 1
@@ -277,8 +278,8 @@ void TouchpadSection::InitContents(GridLayout* layout) {
this);
layout->StartRow(0, double_column_view_set_id());
- layout->AddView(new views::Label(
- l10n_util::GetString(IDS_OPTIONS_SETTINGS_SENSITIVITY_DESCRIPTION)));
+ layout->AddView(new views::Label(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_SENSITIVITY_DESCRIPTION))));
layout->AddView(sensitivity_slider_);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
layout->StartRow(0, single_column_view_set_id());
@@ -359,7 +360,8 @@ void LanguageSection::InitContents(GridLayout* layout) {
layout->StartRow(0, double_column_view_set_id());
views::NativeButton* customize_languages_button = new views::NativeButton(
this,
- l10n_util::GetString(IDS_OPTIONS_SETTINGS_LANGUAGES_CUSTOMIZE));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_LANGUAGES_CUSTOMIZE)));
customize_languages_button->set_tag(kCustomizeLanguagesButton);
xkb_modifier_combobox_ = new views::Combobox(&xkb_modifier_combobox_model_);
@@ -474,8 +476,9 @@ AccessibilitySection::AccessibilitySection(Profile* profile)
}
void AccessibilitySection::InitContents(GridLayout* layout) {
- accessibility_checkbox_ = new views::Checkbox(l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_ACCESSIBILITY_DESCRIPTION));
+ accessibility_checkbox_ =
+ new views::Checkbox(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_ACCESSIBILITY_DESCRIPTION)));
accessibility_checkbox_->set_listener(this);
accessibility_checkbox_->SetMultiLine(true);
diff --git a/chrome/browser/chromeos/options/wifi_config_view.cc b/chrome/browser/chromeos/options/wifi_config_view.cc
index 1383c38..9b8fdd8 100644
--- a/chrome/browser/chromeos/options/wifi_config_view.cc
+++ b/chrome/browser/chromeos/options/wifi_config_view.cc
@@ -137,7 +137,7 @@ void WifiConfigView::UpdateErrorLabel(bool failed) {
id = IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_BAD_CREDENTIALS;
}
if (id != kNoError) {
- error_label_->SetText(l10n_util::GetString(id));
+ error_label_->SetText(UTF16ToWide(l10n_util::GetStringUTF16(id)));
error_label_->SetVisible(true);
} else {
error_label_->SetVisible(false);
@@ -299,8 +299,8 @@ void WifiConfigView::Init() {
// SSID input
layout->StartRow(0, column_view_set_id);
- layout->AddView(new views::Label(l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_ID)));
+ layout->AddView(new views::Label(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_ID))));
if (!wifi_.get()) {
ssid_textfield_ = new views::Textfield(views::Textfield::STYLE_DEFAULT);
ssid_textfield_->SetController(this);
@@ -325,8 +325,8 @@ void WifiConfigView::Init() {
if (wifi_.get() && wifi_->encrypted() &&
wifi_->encryption() == SECURITY_8021X) {
layout->StartRow(0, column_view_set_id);
- layout->AddView(new views::Label(l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_IDENTITY)));
+ layout->AddView(new views::Label(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_IDENTITY))));
identity_textfield_ = new views::Textfield(
views::Textfield::STYLE_DEFAULT);
identity_textfield_->SetController(this);
@@ -335,15 +335,15 @@ void WifiConfigView::Init() {
layout->AddView(identity_textfield_);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
layout->StartRow(0, column_view_set_id);
- layout->AddView(new views::Label(l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT)));
+ layout->AddView(new views::Label(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT))));
if (!wifi_->cert_path().empty()) {
certificate_path_ = wifi_->cert_path();
certificate_loaded = wifi_->IsCertificateLoaded();
}
if (certificate_loaded) {
- std::wstring label = l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_INSTALLED);
+ std::wstring label = UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_INSTALLED));
views::Label* cert_text = new views::Label(label);
cert_text->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
layout->AddView(cert_text);
@@ -352,8 +352,8 @@ void WifiConfigView::Init() {
if (!certificate_path_.empty())
label = UTF8ToWide(certificate_path_);
else
- label = l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_BUTTON);
+ label = UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_BUTTON));
certificate_browse_button_ = new views::NativeButton(this, label);
layout->AddView(certificate_browse_button_);
}
@@ -363,8 +363,8 @@ void WifiConfigView::Init() {
// Security select
if (!wifi_.get()) {
layout->StartRow(0, column_view_set_id);
- layout->AddView(new views::Label(l10n_util::GetString(
- IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SECURITY)));
+ layout->AddView(new views::Label(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SECURITY))));
security_combobox_ = new views::Combobox(new SecurityComboboxModel());
security_combobox_->set_listener(this);
layout->AddView(security_combobox_);
@@ -380,7 +380,8 @@ void WifiConfigView::Init() {
} else {
label_text_id = IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PASSPHRASE;
}
- layout->AddView(new views::Label(l10n_util::GetString(label_text_id)));
+ layout->AddView(new views::Label(
+ UTF16ToWide(l10n_util::GetStringUTF16(label_text_id))));
passphrase_textfield_ = new views::Textfield(
views::Textfield::STYLE_PASSWORD);
passphrase_textfield_->SetController(this);
diff --git a/chrome/browser/chromeos/status/network_dropdown_button.cc b/chrome/browser/chromeos/status/network_dropdown_button.cc
index c850997..8244df4 100644
--- a/chrome/browser/chromeos/status/network_dropdown_button.cc
+++ b/chrome/browser/chromeos/status/network_dropdown_button.cc
@@ -26,7 +26,8 @@ const int NetworkDropdownButton::kThrobDuration = 1000;
NetworkDropdownButton::NetworkDropdownButton(bool browser_mode,
gfx::NativeWindow parent_window)
: DropDownButton(NULL,
- l10n_util::GetString(IDS_STATUSBAR_NO_NETWORKS_MESSAGE),
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_STATUSBAR_NO_NETWORKS_MESSAGE)),
this,
true),
browser_mode_(browser_mode),
@@ -80,7 +81,8 @@ void NetworkDropdownButton::OnNetworkManagerChanged(NetworkLibrary* cros) {
animation_connecting_.Stop();
if (active_network->type() == TYPE_ETHERNET) {
SetIcon(*rb.GetBitmapNamed(IDR_STATUSBAR_WIRED));
- SetText(l10n_util::GetString(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET));
+ SetText(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET)));
} else if (active_network->type() == TYPE_WIFI) {
const WifiNetwork* wifi =
static_cast<const WifiNetwork*>(active_network);
@@ -109,12 +111,14 @@ void NetworkDropdownButton::OnNetworkManagerChanged(NetworkLibrary* cros) {
if (!cros->Connected() && !cros->Connecting()) {
animation_connecting_.Stop();
SetIcon(SkBitmap());
- SetText(l10n_util::GetString(IDS_NETWORK_SELECTION_NONE));
+ SetText(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_NETWORK_SELECTION_NONE)));
}
} else {
animation_connecting_.Stop();
SetIcon(SkBitmap());
- SetText(l10n_util::GetString(IDS_STATUSBAR_NO_NETWORKS_MESSAGE));
+ SetText(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_STATUSBAR_NO_NETWORKS_MESSAGE)));
}
SchedulePaint();
diff --git a/chrome/browser/chromeos/status/network_menu_button.cc b/chrome/browser/chromeos/status/network_menu_button.cc
index 164f7b1..7e7bdd0 100644
--- a/chrome/browser/chromeos/status/network_menu_button.cc
+++ b/chrome/browser/chromeos/status/network_menu_button.cc
@@ -121,8 +121,8 @@ void NetworkMenuButton::SetNetworkIcon(NetworkLibrary* cros,
if (!cros || !CrosLibrary::Get()->EnsureLoaded()) {
SetIcon(*rb.GetBitmapNamed(IDR_STATUSBAR_NETWORK_BARS0));
SetBadge(*rb.GetBitmapNamed(IDR_STATUSBAR_NETWORK_WARNING));
- SetTooltipText(l10n_util::GetString(
- IDS_STATUSBAR_NETWORK_NO_NETWORK_TOOLTIP));
+ SetTooltipText(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_STATUSBAR_NETWORK_NO_NETWORK_TOOLTIP)));
return;
}
@@ -130,8 +130,8 @@ void NetworkMenuButton::SetNetworkIcon(NetworkLibrary* cros,
animation_connecting_.Stop();
SetIcon(*rb.GetBitmapNamed(IDR_STATUSBAR_NETWORK_BARS0));
SetBadge(*rb.GetBitmapNamed(IDR_STATUSBAR_NETWORK_DISCONNECTED));
- SetTooltipText(l10n_util::GetString(
- IDS_STATUSBAR_NETWORK_NO_NETWORK_TOOLTIP));
+ SetTooltipText(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_STATUSBAR_NETWORK_NO_NETWORK_TOOLTIP)));
return;
}
@@ -150,11 +150,10 @@ void NetworkMenuButton::SetNetworkIcon(NetworkLibrary* cros,
wireless = cros->cellular_network();
SetBadge(BadgeForNetworkTechnology(cros->cellular_network()));
}
- SetTooltipText(
- l10n_util::GetStringF(wireless->configuring() ?
- IDS_STATUSBAR_NETWORK_CONFIGURING_TOOLTIP :
- IDS_STATUSBAR_NETWORK_CONNECTING_TOOLTIP,
- UTF8ToWide(wireless->name())));
+ SetTooltipText(UTF16ToWide(l10n_util::GetStringFUTF16(
+ wireless->configuring() ? IDS_STATUSBAR_NETWORK_CONFIGURING_TOOLTIP
+ : IDS_STATUSBAR_NETWORK_CONNECTING_TOOLTIP,
+ UTF8ToUTF16(wireless->name()))));
} else {
// Stop connecting animation since we are not connecting.
animation_connecting_.Stop();
@@ -164,24 +163,25 @@ void NetworkMenuButton::SetNetworkIcon(NetworkLibrary* cros,
SetIcon(*rb.GetBitmapNamed(IDR_STATUSBAR_WIRED));
SetBadge(SkBitmap());
SetTooltipText(
- l10n_util::GetStringF(
+ UTF16ToWide(l10n_util::GetStringFUTF16(
IDS_STATUSBAR_NETWORK_CONNECTED_TOOLTIP,
- l10n_util::GetString(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET)));
+ l10n_util::GetStringUTF16(
+ IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET))));
} else if (network->type() == TYPE_WIFI) {
const WifiNetwork* wifi = static_cast<const WifiNetwork*>(network);
SetIcon(IconForNetworkStrength(wifi, false));
SetBadge(SkBitmap());
- SetTooltipText(l10n_util::GetStringF(
+ SetTooltipText(UTF16ToWide(l10n_util::GetStringFUTF16(
IDS_STATUSBAR_NETWORK_CONNECTED_TOOLTIP,
- UTF8ToWide(wifi->name())));
+ UTF8ToUTF16(wifi->name()))));
} else if (network->type() == TYPE_CELLULAR) {
const CellularNetwork* cellular =
static_cast<const CellularNetwork*>(network);
SetIcon(IconForNetworkStrength(cellular, false));
SetBadge(BadgeForNetworkTechnology(cellular));
- SetTooltipText(l10n_util::GetStringF(
+ SetTooltipText(UTF16ToWide(l10n_util::GetStringFUTF16(
IDS_STATUSBAR_NETWORK_CONNECTED_TOOLTIP,
- UTF8ToWide(cellular->name())));
+ UTF8ToUTF16(cellular->name()))));
}
}
}
diff --git a/chrome/browser/ui/views/about_chrome_view.cc b/chrome/browser/ui/views/about_chrome_view.cc
index 25a81ab..2f263b23 100644
--- a/chrome/browser/ui/views/about_chrome_view.cc
+++ b/chrome/browser/ui/views/about_chrome_view.cc
@@ -312,8 +312,8 @@ void AboutChromeView::Init() {
main_label_chunk5_ = text.substr(url_offsets[0]);
// The Terms of Service URL at the bottom.
- terms_of_service_url_ =
- new views::Link(l10n_util::GetString(IDS_TERMS_OF_SERVICE));
+ terms_of_service_url_ = new views::Link(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_TERMS_OF_SERVICE)));
AddChildView(terms_of_service_url_);
terms_of_service_url_->SetController(this);
diff --git a/chrome/browser/ui/views/generic_info_view_unittest.cc b/chrome/browser/ui/views/generic_info_view_unittest.cc
index 6c26603..ba079f8 100644
--- a/chrome/browser/ui/views/generic_info_view_unittest.cc
+++ b/chrome/browser/ui/views/generic_info_view_unittest.cc
@@ -56,8 +56,8 @@ TEST_F(GenericInfoViewTest, GenericInfoView) {
GenericInfoView* view2 = new GenericInfoView(ARRAYSIZE(kNameIds), kNameIds);
root_view->AddChildView(view2);
- string16 product_name = l10n_util::GetString(IDS_PRODUCT_NAME);
- string16 product_desc = l10n_util::GetString(IDS_PRODUCT_DESCRIPTION);
+ string16 product_name = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
+ string16 product_desc = l10n_util::GetStringUTF16(IDS_PRODUCT_DESCRIPTION);
EXPECT_EQ(product_name, view2->name_views_[0]->GetText());
EXPECT_EQ(product_desc, view2->name_views_[1]->GetText());
window->CloseNow();
diff --git a/chrome/browser/ui/views/keyboard_overlay_delegate.cc b/chrome/browser/ui/views/keyboard_overlay_delegate.cc
index 5673f02..6081316 100644
--- a/chrome/browser/ui/views/keyboard_overlay_delegate.cc
+++ b/chrome/browser/ui/views/keyboard_overlay_delegate.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "base/scoped_ptr.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/dom_ui/html_dialog_ui.h"
#include "chrome/browser/ui/browser.h"
@@ -16,7 +17,7 @@
void KeyboardOverlayDelegate::ShowDialog(gfx::NativeWindow owning_window) {
Browser* browser = BrowserList::GetLastActive();
KeyboardOverlayDelegate* delegate = new KeyboardOverlayDelegate(
- l10n_util::GetString(IDS_KEYBOARD_OVERLAY_TITLE));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_KEYBOARD_OVERLAY_TITLE)));
DCHECK(browser);
browser->BrowserShowHtmlDialog(delegate, owning_window);
}
diff --git a/chrome/browser/ui/views/select_file_dialog.cc b/chrome/browser/ui/views/select_file_dialog.cc
index f012838..1ebf2e5 100644
--- a/chrome/browser/ui/views/select_file_dialog.cc
+++ b/chrome/browser/ui/views/select_file_dialog.cc
@@ -213,7 +213,7 @@ void SelectFileDialogImpl::SelectFile(
NOTREACHED();
return;
}
- title_string = l10n_util::GetString(string_id);
+ title_string = UTF16ToWide(l10n_util::GetStringUTF16(string_id));
} else {
title_string = UTF16ToWide(title);
}