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 { | |
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 applied to all platforms, including win, mac, linux, chromeos, | |
65 // android, ios. | |
66 ALL_PLATFORMS = PLATFORM_WINDOWS | PLATFORM_LINUX | PLATFORM_CHROMEOS | | |
msramek
2016/05/23 14:49:49
nit: Switching order and defining ALL_PLATFORMS =
lshang
2016/05/24 11:55:46
Done.
| |
67 PLATFORM_MAC | | |
68 PLATFORM_ANDROID | | |
69 PLATFORM_IOS, | |
70 | |
71 // Settings only applied to win, mac, linux and chromeos. | |
72 DESKTOP = | |
73 PLATFORM_WINDOWS | PLATFORM_LINUX | PLATFORM_CHROMEOS | PLATFORM_MAC, | |
74 }; | |
75 | |
53 WebsiteSettingsInfo(ContentSettingsType type, | 76 WebsiteSettingsInfo(ContentSettingsType type, |
msramek
2016/05/23 14:49:49
There is one more irregularity that we should take
lshang
2016/05/24 11:55:46
I made it unsyncable on ios, am I addressing it ri
msramek
2016/05/24 14:29:23
What I meant is that iOS *does* use the default se
| |
54 const std::string& name, | 77 const std::string& name, |
55 std::unique_ptr<base::Value> initial_default_value, | 78 std::unique_ptr<base::Value> initial_default_value, |
56 SyncStatus sync_status, | 79 SyncStatus sync_status, |
57 LossyStatus lossy_status, | 80 LossyStatus lossy_status, |
58 ScopingType scoping_type, | 81 ScopingType scoping_type, |
59 IncognitoBehavior incognito_behavior); | 82 IncognitoBehavior incognito_behavior); |
60 ~WebsiteSettingsInfo(); | 83 ~WebsiteSettingsInfo(); |
61 | 84 |
62 ContentSettingsType type() const { return type_; } | 85 ContentSettingsType type() const { return type_; } |
63 const std::string& name() const { return name_; } | 86 const std::string& name() const { return name_; } |
(...skipping 22 matching lines...) Expand all Loading... | |
86 const LossyStatus lossy_status_; | 109 const LossyStatus lossy_status_; |
87 const ScopingType scoping_type_; | 110 const ScopingType scoping_type_; |
88 const IncognitoBehavior incognito_behavior_; | 111 const IncognitoBehavior incognito_behavior_; |
89 | 112 |
90 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsInfo); | 113 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsInfo); |
91 }; | 114 }; |
92 | 115 |
93 } // namespace content_settings | 116 } // namespace content_settings |
94 | 117 |
95 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_ | 118 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_ |
OLD | NEW |