| 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 l10n_util::GetString(IDS_EXCEPTIONS_ALLOW_BUTTON); | 90 return UTF16ToWideHack( |
| 91 l10n_util::GetStringUTF16(IDS_EXCEPTIONS_ALLOW_BUTTON)); |
| 91 case CONTENT_SETTING_BLOCK: | 92 case CONTENT_SETTING_BLOCK: |
| 92 return l10n_util::GetString(IDS_EXCEPTIONS_BLOCK_BUTTON); | 93 return UTF16ToWideHack( |
| 94 l10n_util::GetStringUTF16(IDS_EXCEPTIONS_BLOCK_BUTTON)); |
| 93 default: | 95 default: |
| 94 NOTREACHED(); | 96 NOTREACHED(); |
| 95 } | 97 } |
| 96 break; | 98 break; |
| 97 | 99 |
| 98 default: | 100 default: |
| 99 NOTREACHED(); | 101 NOTREACHED(); |
| 100 } | 102 } |
| 101 | 103 |
| 102 return std::wstring(); | 104 return std::wstring(); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 } | 189 } |
| 188 | 190 |
| 189 void PluginExceptionsTableModel::ReloadSettings() { | 191 void PluginExceptionsTableModel::ReloadSettings() { |
| 190 ClearSettings(); | 192 ClearSettings(); |
| 191 LoadSettings(); | 193 LoadSettings(); |
| 192 | 194 |
| 193 if (observer_) | 195 if (observer_) |
| 194 observer_->OnModelChanged(); | 196 observer_->OnModelChanged(); |
| 195 } | 197 } |
| 196 | 198 |
| OLD | NEW |