Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(692)

Unified Diff: components/content_settings/core/browser/website_settings_info.h

Issue 1991623005: Only Register() platform specific content settings types on different platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/content_settings/core/browser/website_settings_info.h
diff --git a/components/content_settings/core/browser/website_settings_info.h b/components/content_settings/core/browser/website_settings_info.h
index 762e32e828c4e52f58a802817d527fdb920a9297..bf146ee5d6a333edb1ae92353760012e499f91c3 100644
--- a/components/content_settings/core/browser/website_settings_info.h
+++ b/components/content_settings/core/browser/website_settings_info.h
@@ -50,6 +50,26 @@ class WebsiteSettingsInfo {
DONT_INHERIT_IN_INCOGNITO,
};
+ // TODO(lshang): Remove this enum when content settings can be registered from
+ // within the component in which they are used. When this is possible then
+ // ifdefs can be contained within each component.
+ 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.
+ PLATFORM_WINDOWS = 1 << 0,
+ PLATFORM_LINUX = 1 << 1,
+ PLATFORM_CHROMEOS = 1 << 2,
+ PLATFORM_MAC = 1 << 3,
+ PLATFORM_ANDROID = 1 << 4,
+ PLATFORM_IOS = 1 << 5,
+
+ // Settings only applied to win, mac, linux and chromeos.
+ DESKTOP =
+ PLATFORM_WINDOWS | PLATFORM_LINUX | PLATFORM_CHROMEOS | PLATFORM_MAC,
+
+ // Settings applied to all platforms, including win, mac, linux, chromeos,
+ // android, ios.
+ ALL_PLATFORMS = DESKTOP | PLATFORM_ANDROID | PLATFORM_IOS,
+ };
raymes 2016/05/25 03:36:07 Hmm should we just have this is WebsiteSettingsReg
lshang 2016/05/25 10:38:16 Done.
+
WebsiteSettingsInfo(ContentSettingsType type,
const std::string& name,
std::unique_ptr<base::Value> initial_default_value,

Powered by Google App Engine
This is Rietveld 408576698