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/notifications/notification_exceptions_table_model.h" | 5 #include "chrome/browser/notifications/notification_exceptions_table_model.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/table_model_observer.h" | 8 #include "app/table_model_observer.h" |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 std::wstring NotificationExceptionsTableModel::GetText(int row, | 74 std::wstring NotificationExceptionsTableModel::GetText(int row, |
75 int column_id) { | 75 int column_id) { |
76 const Entry& entry = entries_[row]; | 76 const Entry& entry = entries_[row]; |
77 if (column_id == IDS_EXCEPTIONS_HOSTNAME_HEADER) { | 77 if (column_id == IDS_EXCEPTIONS_HOSTNAME_HEADER) { |
78 return content_settings_helper::OriginToWString(entry.origin); | 78 return content_settings_helper::OriginToWString(entry.origin); |
79 } | 79 } |
80 | 80 |
81 if (column_id == IDS_EXCEPTIONS_ACTION_HEADER) { | 81 if (column_id == IDS_EXCEPTIONS_ACTION_HEADER) { |
82 switch (entry.setting) { | 82 switch (entry.setting) { |
83 case CONTENT_SETTING_ALLOW: | 83 case CONTENT_SETTING_ALLOW: |
84 return l10n_util::GetString(IDS_EXCEPTIONS_ALLOW_BUTTON); | 84 return UTF16ToWideHack( |
| 85 l10n_util::GetStringUTF16(IDS_EXCEPTIONS_ALLOW_BUTTON)); |
85 case CONTENT_SETTING_BLOCK: | 86 case CONTENT_SETTING_BLOCK: |
86 return l10n_util::GetString(IDS_EXCEPTIONS_BLOCK_BUTTON); | 87 return UTF16ToWideHack( |
| 88 l10n_util::GetStringUTF16(IDS_EXCEPTIONS_BLOCK_BUTTON)); |
87 default: | 89 default: |
88 break; | 90 break; |
89 } | 91 } |
90 } | 92 } |
91 | 93 |
92 NOTREACHED(); | 94 NOTREACHED(); |
93 return std::wstring(); | 95 return std::wstring(); |
94 } | 96 } |
95 | 97 |
96 void NotificationExceptionsTableModel::SetObserver( | 98 void NotificationExceptionsTableModel::SetObserver( |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 ContentSetting in_setting) | 130 ContentSetting in_setting) |
129 : origin(in_origin), | 131 : origin(in_origin), |
130 setting(in_setting) { | 132 setting(in_setting) { |
131 } | 133 } |
132 | 134 |
133 bool NotificationExceptionsTableModel::Entry::operator<( | 135 bool NotificationExceptionsTableModel::Entry::operator<( |
134 const NotificationExceptionsTableModel::Entry& b) const { | 136 const NotificationExceptionsTableModel::Entry& b) const { |
135 DCHECK_NE(origin, b.origin); | 137 DCHECK_NE(origin, b.origin); |
136 return origin < b.origin; | 138 return origin < b.origin; |
137 } | 139 } |
OLD | NEW |