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/content_exceptions_table_model.h" | 5 #include "chrome/browser/content_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/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/host_content_settings_map.h" | 10 #include "chrome/browser/host_content_settings_map.h" |
(...skipping 81 matching lines...) Loading... |
92 switch (column_id) { | 92 switch (column_id) { |
93 case IDS_EXCEPTIONS_PATTERN_HEADER: | 93 case IDS_EXCEPTIONS_PATTERN_HEADER: |
94 return UTF8ToWide(entry.first.AsString()); | 94 return UTF8ToWide(entry.first.AsString()); |
95 | 95 |
96 case IDS_EXCEPTIONS_ACTION_HEADER: | 96 case IDS_EXCEPTIONS_ACTION_HEADER: |
97 switch (entry.second) { | 97 switch (entry.second) { |
98 case CONTENT_SETTING_ALLOW: | 98 case CONTENT_SETTING_ALLOW: |
99 return l10n_util::GetString(IDS_EXCEPTIONS_ALLOW_BUTTON); | 99 return l10n_util::GetString(IDS_EXCEPTIONS_ALLOW_BUTTON); |
100 case CONTENT_SETTING_BLOCK: | 100 case CONTENT_SETTING_BLOCK: |
101 return l10n_util::GetString(IDS_EXCEPTIONS_BLOCK_BUTTON); | 101 return l10n_util::GetString(IDS_EXCEPTIONS_BLOCK_BUTTON); |
102 case CONTENT_SETTING_ASK: | |
103 return l10n_util::GetString(IDS_EXCEPTIONS_ASK_BUTTON); | |
104 case CONTENT_SETTING_SESSION_ONLY: | 102 case CONTENT_SETTING_SESSION_ONLY: |
105 return l10n_util::GetString(IDS_EXCEPTIONS_SESSION_ONLY_BUTTON); | 103 return l10n_util::GetString(IDS_EXCEPTIONS_SESSION_ONLY_BUTTON); |
106 default: | 104 default: |
107 NOTREACHED(); | 105 NOTREACHED(); |
108 } | 106 } |
109 break; | 107 break; |
110 | 108 |
111 default: | 109 default: |
112 NOTREACHED(); | 110 NOTREACHED(); |
113 } | 111 } |
114 | 112 |
115 return std::wstring(); | 113 return std::wstring(); |
116 } | 114 } |
117 | 115 |
118 void ContentExceptionsTableModel::SetObserver(TableModelObserver* observer) { | 116 void ContentExceptionsTableModel::SetObserver(TableModelObserver* observer) { |
119 observer_ = observer; | 117 observer_ = observer; |
120 } | 118 } |
OLD | NEW |