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

Unified Diff: chrome/browser/chromeos/login/user_controller.cc

Issue 8142026: Revert 104076 - Change std::wstring to string16 for views::Link (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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
« no previous file with comments | « chrome/browser/chromeos/login/update_view.cc ('k') | chrome/browser/chromeos/login/user_image_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/user_controller.cc
===================================================================
--- chrome/browser/chromeos/login/user_controller.cc (revision 104083)
+++ chrome/browser/chromeos/login/user_controller.cc (working copy)
@@ -459,16 +459,16 @@
}
Widget* UserController::CreateLabelWidget(int index, WmIpcWindowType type) {
- string16 text;
+ std::wstring text;
if (is_guest_) {
- text = string16();
+ text = std::wstring();
} 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::GetStringUTF16(IDS_ADD_USER);
+ text = UTF16ToWide(l10n_util::GetStringUTF16(IDS_ADD_USER));
} else {
- text = UTF8ToUTF16(user_.GetDisplayName());
+ text = UTF8ToWide(user_.GetDisplayName());
}
views::Label* label = NULL;
@@ -476,12 +476,11 @@
if (is_new_user_) {
label = new views::Label(text);
} else if (type == WM_IPC_WINDOW_LOGIN_LABEL) {
- label = UsernameView::CreateShapedUsernameView(UTF16ToWide(text), false);
+ label = UsernameView::CreateShapedUsernameView(text, false);
} else {
DCHECK(type == WM_IPC_WINDOW_LOGIN_UNSELECTED_LABEL);
// TODO(altimofeev): switch to the rounded username view.
- label = UsernameView::CreateShapedUsernameView(
- UTF16ToWideHack(text), true);
+ label = UsernameView::CreateShapedUsernameView(text, true);
}
const gfx::Font& font = (type == WM_IPC_WINDOW_LOGIN_LABEL) ?
« no previous file with comments | « chrome/browser/chromeos/login/update_view.cc ('k') | chrome/browser/chromeos/login/user_image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698