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

Side by Side Diff: chrome/browser/ui/views/options/passwords_page_view.cc

Issue 5154009: Cleanup AdjustStringForLocaleDirection() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: further fixes Created 10 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/views/options/passwords_page_view.h" 5 #include "chrome/browser/views/options/passwords_page_view.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 switch (col_id) { 75 switch (col_id) {
76 case IDS_PASSWORDS_PAGE_VIEW_SITE_COLUMN: { // Site. 76 case IDS_PASSWORDS_PAGE_VIEW_SITE_COLUMN: { // Site.
77 // Force URL to have LTR directionality. 77 // Force URL to have LTR directionality.
78 std::wstring url(saved_signons_[row]->display_url.display_url()); 78 std::wstring url(saved_signons_[row]->display_url.display_url());
79 url = UTF16ToWide(base::i18n::GetDisplayStringInLTRDirectionality( 79 url = UTF16ToWide(base::i18n::GetDisplayStringInLTRDirectionality(
80 WideToUTF16(url))); 80 WideToUTF16(url)));
81 return url; 81 return url;
82 } 82 }
83 case IDS_PASSWORDS_PAGE_VIEW_USERNAME_COLUMN: { // Username. 83 case IDS_PASSWORDS_PAGE_VIEW_USERNAME_COLUMN: { // Username.
84 std::wstring username = GetPasswordFormAt(row)->username_value; 84 std::wstring username = GetPasswordFormAt(row)->username_value;
85 base::i18n::AdjustStringForLocaleDirection(username, &username); 85 base::i18n::AdjustStringForLocaleDirection(&username);
86 return username; 86 return username;
87 } 87 }
88 default: 88 default:
89 NOTREACHED() << "Invalid column."; 89 NOTREACHED() << "Invalid column.";
90 return std::wstring(); 90 return std::wstring();
91 } 91 }
92 } 92 }
93 93
94 int PasswordsTableModel::CompareValues(int row1, int row2, 94 int PasswordsTableModel::CompareValues(int row1, int row2,
95 int column_id) { 95 int column_id) {
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 bool show = allow_show_passwords_.GetValue(); 358 bool show = allow_show_passwords_.GetValue();
359 if (!show) 359 if (!show)
360 HidePassword(); 360 HidePassword();
361 show_button_.SetVisible(show); 361 show_button_.SetVisible(show);
362 password_label_.SetVisible(show); 362 password_label_.SetVisible(show);
363 // Update the layout (it may depend on the button size). 363 // Update the layout (it may depend on the button size).
364 show_button_.InvalidateLayout(); 364 show_button_.InvalidateLayout();
365 Layout(); 365 Layout();
366 } 366 }
367 } 367 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698