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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 95 } |
96 break; | 96 break; |
97 | 97 |
98 default: | 98 default: |
99 NOTREACHED(); | 99 NOTREACHED(); |
100 } | 100 } |
101 | 101 |
102 return std::wstring(); | 102 return std::wstring(); |
103 } | 103 } |
104 | 104 |
| 105 bool PluginExceptionsTableModel::HasGroups() { |
| 106 return true; |
| 107 } |
| 108 |
105 void PluginExceptionsTableModel::SetObserver(TableModelObserver* observer) { | 109 void PluginExceptionsTableModel::SetObserver(TableModelObserver* observer) { |
106 observer_ = observer; | 110 observer_ = observer; |
107 } | 111 } |
108 | 112 |
109 TableModel::Groups PluginExceptionsTableModel::GetGroups() { | 113 TableModel::Groups PluginExceptionsTableModel::GetGroups() { |
110 return groups_; | 114 return groups_; |
111 } | 115 } |
112 | 116 |
113 int PluginExceptionsTableModel::GetGroupID(int row) { | 117 int PluginExceptionsTableModel::GetGroupID(int row) { |
114 DCHECK_LT(row, static_cast<int>(settings_.size())); | 118 DCHECK_LT(row, static_cast<int>(settings_.size())); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 } | 187 } |
184 | 188 |
185 void PluginExceptionsTableModel::ReloadSettings() { | 189 void PluginExceptionsTableModel::ReloadSettings() { |
186 ClearSettings(); | 190 ClearSettings(); |
187 LoadSettings(); | 191 LoadSettings(); |
188 | 192 |
189 if (observer_) | 193 if (observer_) |
190 observer_->OnModelChanged(); | 194 observer_->OnModelChanged(); |
191 } | 195 } |
192 | 196 |
OLD | NEW |