OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/api/content_settings/content_settings_helper
s.h" | 5 #include "chrome/browser/extensions/api/content_settings/content_settings_helper
s.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/public/common/url_constants.h" | 10 #include "content/public/common/url_constants.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 "location", | 26 "location", |
27 "notifications", | 27 "notifications", |
28 "auto-select-certificate", | 28 "auto-select-certificate", |
29 "fullscreen", | 29 "fullscreen", |
30 "mouselock", | 30 "mouselock", |
31 "mixed-script", | 31 "mixed-script", |
32 "media-stream", | 32 "media-stream", |
33 "media-stream-mic", | 33 "media-stream-mic", |
34 "media-stream-camera", | 34 "media-stream-camera", |
35 "register-protocol-handler", | 35 "register-protocol-handler", |
36 "ppapi-broker" | 36 "ppapi-broker", |
| 37 "multiple-automatic-downloads" |
37 }; | 38 }; |
38 | 39 |
39 // TODO(msramek): Assert that |kContentSettingsTypeNames| is synced with | 40 // TODO(msramek): Assert that |kContentSettingsTypeNames| is synced with |
40 // enum |ContentSettingsType|. | 41 // enum |ContentSettingsType|. |
41 static_assert(arraysize(kContentSettingsTypeNames) <= | 42 static_assert(arraysize(kContentSettingsTypeNames) <= |
42 CONTENT_SETTINGS_NUM_TYPES, | 43 CONTENT_SETTINGS_NUM_TYPES, |
43 "kContentSettingsTypeNames has an unexpected number of elements"); | 44 "kContentSettingsTypeNames has an unexpected number of elements"); |
44 | 45 |
45 const char* const kContentSettingNames[] = { | 46 const char* const kContentSettingNames[] = { |
46 "default", | 47 "default", |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 } | 153 } |
153 | 154 |
154 const char* ContentSettingToString(ContentSetting setting) { | 155 const char* ContentSettingToString(ContentSetting setting) { |
155 size_t index = static_cast<size_t>(setting); | 156 size_t index = static_cast<size_t>(setting); |
156 DCHECK_LT(index, arraysize(kContentSettingNames)); | 157 DCHECK_LT(index, arraysize(kContentSettingNames)); |
157 return kContentSettingNames[index]; | 158 return kContentSettingNames[index]; |
158 } | 159 } |
159 | 160 |
160 } // namespace content_settings_helpers | 161 } // namespace content_settings_helpers |
161 } // namespace extensions | 162 } // namespace extensions |
OLD | NEW |