OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_settings/content_settings_utils.h" | 5 #include "chrome/browser/content_settings/content_settings_utils.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/string_split.h" | 11 #include "base/string_split.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 // The names of the ContentSettingsType values, for use with dictionary prefs. | 17 // The names of the ContentSettingsType values, for use with dictionary prefs. |
18 const char* kTypeNames[] = { | 18 const char* kTypeNames[] = { |
19 "cookies", | 19 "cookies", |
20 "images", | 20 "images", |
21 "javascript", | 21 "javascript", |
22 "plugins", | 22 "plugins", |
23 "popups", | 23 "popups", |
24 "geolocation", | 24 "geolocation", |
25 "notifications", | 25 "notifications", |
26 "intents", | 26 "intents", |
27 "auto-select-certificate" | 27 "auto-select-certificate", |
| 28 "fullscreen" |
28 }; | 29 }; |
29 COMPILE_ASSERT(arraysize(kTypeNames) == CONTENT_SETTINGS_NUM_TYPES, | 30 COMPILE_ASSERT(arraysize(kTypeNames) == CONTENT_SETTINGS_NUM_TYPES, |
30 type_names_incorrect_size); | 31 type_names_incorrect_size); |
31 | 32 |
32 const char kPatternSeparator[] = ","; | 33 const char kPatternSeparator[] = ","; |
33 | 34 |
34 } // namespace | 35 } // namespace |
35 | 36 |
36 namespace content_settings { | 37 namespace content_settings { |
37 | 38 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 return true; | 108 return true; |
108 } | 109 } |
109 int int_value = -1; | 110 int int_value = -1; |
110 if (!value->GetAsInteger(&int_value)) | 111 if (!value->GetAsInteger(&int_value)) |
111 return false; | 112 return false; |
112 *setting = IntToContentSetting(int_value); | 113 *setting = IntToContentSetting(int_value); |
113 return *setting != CONTENT_SETTING_DEFAULT; | 114 return *setting != CONTENT_SETTING_DEFAULT; |
114 } | 115 } |
115 | 116 |
116 } // namespace content_settings | 117 } // namespace content_settings |
OLD | NEW |