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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 | 50 |
| 51 typedef std::vector<ContentSettingPatternSource> ContentSettingsForOneType; | 51 typedef std::vector<ContentSettingPatternSource> ContentSettingsForOneType; |
| 52 | 52 |
| 53 struct RendererContentSettingRules { | 53 struct RendererContentSettingRules { |
| 54 RendererContentSettingRules(); | 54 RendererContentSettingRules(); |
| 55 ~RendererContentSettingRules(); | 55 ~RendererContentSettingRules(); |
| 56 ContentSettingsForOneType image_rules; | 56 ContentSettingsForOneType image_rules; |
| 57 ContentSettingsForOneType script_rules; | 57 ContentSettingsForOneType script_rules; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 class NoResourceIdentifier { | |
| 61 public: | |
| 62 static const std::string GetResourceIdentifier() { return std::string(); } | |
|
markusheintz_
2015/03/27 10:27:34
Add
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(No
Deepak
2015/03/27 11:40:04
Done.
| |
| 63 }; | |
| 64 | |
| 60 namespace content_settings { | 65 namespace content_settings { |
| 61 | 66 |
| 62 // Enum containing the various source for content settings. Settings can be | 67 // Enum containing the various source for content settings. Settings can be |
| 63 // set by policy, extension, the user or by the custodian of a supervised user. | 68 // set by policy, extension, the user or by the custodian of a supervised user. |
| 64 // Certain (internal) schemes are whilelisted. For whilelisted schemes the | 69 // Certain (internal) schemes are whilelisted. For whilelisted schemes the |
| 65 // source is |SETTING_SOURCE_WHITELIST|. | 70 // source is |SETTING_SOURCE_WHITELIST|. |
| 66 enum SettingSource { | 71 enum SettingSource { |
| 67 SETTING_SOURCE_NONE, | 72 SETTING_SOURCE_NONE, |
| 68 SETTING_SOURCE_POLICY, | 73 SETTING_SOURCE_POLICY, |
| 69 SETTING_SOURCE_EXTENSION, | 74 SETTING_SOURCE_EXTENSION, |
| 70 SETTING_SOURCE_USER, | 75 SETTING_SOURCE_USER, |
| 71 SETTING_SOURCE_WHITELIST, | 76 SETTING_SOURCE_WHITELIST, |
| 72 SETTING_SOURCE_SUPERVISED, | 77 SETTING_SOURCE_SUPERVISED, |
| 73 }; | 78 }; |
| 74 | 79 |
| 75 // |SettingInfo| provides meta data for content setting values. |source| | 80 // |SettingInfo| provides meta data for content setting values. |source| |
| 76 // contains the source of a value. |primary_pattern| and |secondary_pattern| | 81 // contains the source of a value. |primary_pattern| and |secondary_pattern| |
| 77 // contains the patterns of the appling rule. | 82 // contains the patterns of the appling rule. |
| 78 struct SettingInfo { | 83 struct SettingInfo { |
| 79 SettingSource source; | 84 SettingSource source; |
| 80 ContentSettingsPattern primary_pattern; | 85 ContentSettingsPattern primary_pattern; |
| 81 ContentSettingsPattern secondary_pattern; | 86 ContentSettingsPattern secondary_pattern; |
| 82 }; | 87 }; |
| 83 | 88 |
| 84 } // namespace content_settings | 89 } // namespace content_settings |
| 85 | 90 |
| 86 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_H_ | 91 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_H_ |
| OLD | NEW |