Chromium Code Reviews| 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 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_H_ | 5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_H_ |
| 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_H_ | 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 typedef std::string ResourceIdentifier; | 70 typedef std::string ResourceIdentifier; |
| 71 | 71 |
| 72 // Enum containing the various source for content settings. Settings can be | 72 // Enum containing the various source for content settings. Settings can be |
| 73 // set by policy, extension, the user or by the custodian of a supervised user. | 73 // set by policy, extension, the user or by the custodian of a supervised user. |
| 74 // Certain (internal) schemes are whilelisted. For whilelisted schemes the | 74 // Certain (internal) schemes are whilelisted. For whilelisted schemes the |
| 75 // source is |SETTING_SOURCE_WHITELIST|. | 75 // source is |SETTING_SOURCE_WHITELIST|. |
| 76 enum SettingSource { | 76 enum SettingSource { |
| 77 SETTING_SOURCE_NONE, | 77 SETTING_SOURCE_NONE, |
| 78 SETTING_SOURCE_POLICY, | 78 SETTING_SOURCE_POLICY, |
| 79 SETTING_SOURCE_EXTENSION, | 79 SETTING_SOURCE_EXTENSION, |
| 80 SETTING_SOURCE_SYSTEM, | |
|
Peter Beverloo
2017/05/15 15:10:09
dito
awdf
2017/05/16 15:17:36
actually i do need to pick a settings source for t
raymes
2017/05/17 03:13:38
Yep, perfect.
| |
| 80 SETTING_SOURCE_USER, | 81 SETTING_SOURCE_USER, |
| 81 SETTING_SOURCE_WHITELIST, | 82 SETTING_SOURCE_WHITELIST, |
| 82 SETTING_SOURCE_SUPERVISED, | 83 SETTING_SOURCE_SUPERVISED, |
| 83 }; | 84 }; |
| 84 | 85 |
| 85 // |SettingInfo| provides meta data for content setting values. |source| | 86 // |SettingInfo| provides meta data for content setting values. |source| |
| 86 // contains the source of a value. |primary_pattern| and |secondary_pattern| | 87 // contains the source of a value. |primary_pattern| and |secondary_pattern| |
| 87 // contains the patterns of the appling rule. | 88 // contains the patterns of the appling rule. |
| 88 struct SettingInfo { | 89 struct SettingInfo { |
| 89 SettingSource source; | 90 SettingSource source; |
| 90 ContentSettingsPattern primary_pattern; | 91 ContentSettingsPattern primary_pattern; |
| 91 ContentSettingsPattern secondary_pattern; | 92 ContentSettingsPattern secondary_pattern; |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 } // namespace content_settings | 95 } // namespace content_settings |
| 95 | 96 |
| 96 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_H_ | 97 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_H_ |
| OLD | NEW |