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

Unified Diff: chrome/browser/views/password_manager_view.cc

Issue 18076: request review: fix issue 2821 and 6132 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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/views/options/general_page_view.cc ('k') | chrome/browser/views/shelf_item_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/password_manager_view.cc
===================================================================
--- chrome/browser/views/password_manager_view.cc (revision 8587)
+++ chrome/browser/views/password_manager_view.cc (working copy)
@@ -73,10 +73,21 @@
std::wstring PasswordManagerTableModel::GetText(int row,
int col_id) {
switch (col_id) {
- case IDS_PASSWORD_MANAGER_VIEW_SITE_COLUMN: // Site.
- return saved_signons_[row]->display_url.display_url();
- case IDS_PASSWORD_MANAGER_VIEW_USERNAME_COLUMN: // Username.
- return GetPasswordFormAt(row)->username_value;
+ case IDS_PASSWORD_MANAGER_VIEW_SITE_COLUMN: { // Site.
+ const std::wstring& url = saved_signons_[row]->display_url.display_url();
+ // Force URL to have LTR directionality.
+ if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) {
+ std::wstring localized_url = url;
+ l10n_util::WrapStringWithLTRFormatting(&localized_url);
+ return localized_url;
+ }
+ return url;
+ }
+ case IDS_PASSWORD_MANAGER_VIEW_USERNAME_COLUMN: { // Username.
+ std::wstring username = GetPasswordFormAt(row)->username_value;
+ l10n_util::AdjustStringForLocaleDirection(username, &username);
+ return username;
+ }
default:
NOTREACHED() << "Invalid column.";
return std::wstring();
« no previous file with comments | « chrome/browser/views/options/general_page_view.cc ('k') | chrome/browser/views/shelf_item_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698