OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BROWSER_WEBSITE_SETTINGS_INFO_H_ | 5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_ |
6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_ | 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
43 }; | 43 }; |
44 | 44 |
45 enum IncognitoBehavior { | 45 enum IncognitoBehavior { |
46 // Settings will be inherited from regular to incognito profiles as usual. | 46 // Settings will be inherited from regular to incognito profiles as usual. |
47 INHERIT_IN_INCOGNITO, | 47 INHERIT_IN_INCOGNITO, |
48 | 48 |
49 // Settings will not be inherited from regular to incognito profiles. | 49 // Settings will not be inherited from regular to incognito profiles. |
50 DONT_INHERIT_IN_INCOGNITO, | 50 DONT_INHERIT_IN_INCOGNITO, |
51 }; | 51 }; |
52 | 52 |
53 // TODO(lshang): Remove this enum when content settings can be registered from | |
54 // within the component in which they are used. When this is possible then | |
55 // ifdefs can be contained within each component. | |
56 enum Platform : uint32_t { | |
raymes
2016/05/25 03:36:07
We could also have
typedef uint32_t Platforms;
to
lshang
2016/05/25 10:38:16
Done.
| |
57 PLATFORM_WINDOWS = 1 << 0, | |
58 PLATFORM_LINUX = 1 << 1, | |
59 PLATFORM_CHROMEOS = 1 << 2, | |
60 PLATFORM_MAC = 1 << 3, | |
61 PLATFORM_ANDROID = 1 << 4, | |
62 PLATFORM_IOS = 1 << 5, | |
63 | |
64 // Settings only applied to win, mac, linux and chromeos. | |
65 DESKTOP = | |
66 PLATFORM_WINDOWS | PLATFORM_LINUX | PLATFORM_CHROMEOS | PLATFORM_MAC, | |
67 | |
68 // Settings applied to all platforms, including win, mac, linux, chromeos, | |
69 // android, ios. | |
70 ALL_PLATFORMS = DESKTOP | PLATFORM_ANDROID | PLATFORM_IOS, | |
71 }; | |
raymes
2016/05/25 03:36:07
Hmm should we just have this is WebsiteSettingsReg
lshang
2016/05/25 10:38:16
Done.
| |
72 | |
53 WebsiteSettingsInfo(ContentSettingsType type, | 73 WebsiteSettingsInfo(ContentSettingsType type, |
54 const std::string& name, | 74 const std::string& name, |
55 std::unique_ptr<base::Value> initial_default_value, | 75 std::unique_ptr<base::Value> initial_default_value, |
56 SyncStatus sync_status, | 76 SyncStatus sync_status, |
57 LossyStatus lossy_status, | 77 LossyStatus lossy_status, |
58 ScopingType scoping_type, | 78 ScopingType scoping_type, |
59 IncognitoBehavior incognito_behavior); | 79 IncognitoBehavior incognito_behavior); |
60 ~WebsiteSettingsInfo(); | 80 ~WebsiteSettingsInfo(); |
61 | 81 |
62 ContentSettingsType type() const { return type_; } | 82 ContentSettingsType type() const { return type_; } |
(...skipping 23 matching lines...) Expand all Loading... | |
86 const LossyStatus lossy_status_; | 106 const LossyStatus lossy_status_; |
87 const ScopingType scoping_type_; | 107 const ScopingType scoping_type_; |
88 const IncognitoBehavior incognito_behavior_; | 108 const IncognitoBehavior incognito_behavior_; |
89 | 109 |
90 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsInfo); | 110 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsInfo); |
91 }; | 111 }; |
92 | 112 |
93 } // namespace content_settings | 113 } // namespace content_settings |
94 | 114 |
95 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_ | 115 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_ |
OLD | NEW |