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

Side by Side Diff: components/content_settings/core/browser/content_settings_registry.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: split the changes and register images, plugins, mouselock in this CL Created 4 years, 6 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 unified diff | Download patch
OLDNEW
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_CONTENT_SETTINGS_REGISTRY_H_ 5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_REGISTRY_H_
6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_REGISTRY_H_ 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_REGISTRY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 private: 47 private:
48 friend class ContentSettingsRegistryTest; 48 friend class ContentSettingsRegistryTest;
49 friend struct base::DefaultLazyInstanceTraits<ContentSettingsRegistry>; 49 friend struct base::DefaultLazyInstanceTraits<ContentSettingsRegistry>;
50 50
51 ContentSettingsRegistry(); 51 ContentSettingsRegistry();
52 ContentSettingsRegistry(WebsiteSettingsRegistry* website_settings_registry); 52 ContentSettingsRegistry(WebsiteSettingsRegistry* website_settings_registry);
53 ~ContentSettingsRegistry(); 53 ~ContentSettingsRegistry();
54 54
55 void Init(); 55 void Init();
56 56
57 typedef uint32_t Platforms;
58
57 // Register a new content setting. This maps an origin to an ALLOW/ASK/BLOCK 59 // Register a new content setting. This maps an origin to an ALLOW/ASK/BLOCK
58 // value (see the ContentSetting enum). 60 // value (see the ContentSetting enum).
59 void Register(ContentSettingsType type, 61 void Register(ContentSettingsType type,
60 const std::string& name, 62 const std::string& name,
61 ContentSetting initial_default_value, 63 ContentSetting initial_default_value,
62 WebsiteSettingsInfo::SyncStatus sync_status, 64 WebsiteSettingsInfo::SyncStatus sync_status,
63 const std::vector<std::string>& whitelisted_schemes, 65 const std::vector<std::string>& whitelisted_schemes,
64 const std::set<ContentSetting>& valid_settings, 66 const std::set<ContentSetting>& valid_settings,
65 WebsiteSettingsInfo::ScopingType scoping_type, 67 WebsiteSettingsInfo::ScopingType scoping_type,
68 Platforms platforms,
66 ContentSettingsInfo::IncognitoBehavior incognito_behavior); 69 ContentSettingsInfo::IncognitoBehavior incognito_behavior);
67 70
68 Map content_settings_info_; 71 Map content_settings_info_;
69 WebsiteSettingsRegistry* website_settings_registry_; 72 WebsiteSettingsRegistry* website_settings_registry_;
70 73
71 DISALLOW_COPY_AND_ASSIGN(ContentSettingsRegistry); 74 DISALLOW_COPY_AND_ASSIGN(ContentSettingsRegistry);
72 }; 75 };
73 76
74 } // namespace content_settings 77 } // namespace content_settings
75 78
76 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_REGISTRY_H_ 79 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_REGISTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698