OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |