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/plugin_exceptions_table_model.h" | 5 #include "chrome/browser/plugin_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/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 DCHECK_LT(row, static_cast<int>(settings_.size())); | 80 DCHECK_LT(row, static_cast<int>(settings_.size())); |
81 SettingsEntry& entry = settings_[row]; | 81 SettingsEntry& entry = settings_[row]; |
82 switch (column_id) { | 82 switch (column_id) { |
83 case IDS_EXCEPTIONS_PATTERN_HEADER: | 83 case IDS_EXCEPTIONS_PATTERN_HEADER: |
84 case IDS_EXCEPTIONS_HOSTNAME_HEADER: | 84 case IDS_EXCEPTIONS_HOSTNAME_HEADER: |
85 return UTF8ToWide(entry.pattern.AsString()); | 85 return UTF8ToWide(entry.pattern.AsString()); |
86 | 86 |
87 case IDS_EXCEPTIONS_ACTION_HEADER: | 87 case IDS_EXCEPTIONS_ACTION_HEADER: |
88 switch (entry.setting) { | 88 switch (entry.setting) { |
89 case CONTENT_SETTING_ALLOW: | 89 case CONTENT_SETTING_ALLOW: |
90 return UTF16ToWideHack( | 90 return l10n_util::GetString(IDS_EXCEPTIONS_ALLOW_BUTTON); |
91 l10n_util::GetStringUTF16(IDS_EXCEPTIONS_ALLOW_BUTTON)); | |
92 case CONTENT_SETTING_BLOCK: | 91 case CONTENT_SETTING_BLOCK: |
93 return UTF16ToWideHack( | 92 return l10n_util::GetString(IDS_EXCEPTIONS_BLOCK_BUTTON); |
94 l10n_util::GetStringUTF16(IDS_EXCEPTIONS_BLOCK_BUTTON)); | |
95 default: | 93 default: |
96 NOTREACHED(); | 94 NOTREACHED(); |
97 } | 95 } |
98 break; | 96 break; |
99 | 97 |
100 default: | 98 default: |
101 NOTREACHED(); | 99 NOTREACHED(); |
102 } | 100 } |
103 | 101 |
104 return std::wstring(); | 102 return std::wstring(); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 } | 187 } |
190 | 188 |
191 void PluginExceptionsTableModel::ReloadSettings() { | 189 void PluginExceptionsTableModel::ReloadSettings() { |
192 ClearSettings(); | 190 ClearSettings(); |
193 LoadSettings(); | 191 LoadSettings(); |
194 | 192 |
195 if (observer_) | 193 if (observer_) |
196 observer_->OnModelChanged(); | 194 observer_->OnModelChanged(); |
197 } | 195 } |
198 | 196 |
OLD | NEW |