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_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 28 matching lines...) Expand all Loading... |
39 // Reset the instance for use inside tests. | 39 // Reset the instance for use inside tests. |
40 void ResetForTest(); | 40 void ResetForTest(); |
41 | 41 |
42 const ContentSettingsInfo* Get(ContentSettingsType type) const; | 42 const ContentSettingsInfo* Get(ContentSettingsType type) const; |
43 | 43 |
44 const_iterator begin() const; | 44 const_iterator begin() const; |
45 const_iterator end() const; | 45 const_iterator end() const; |
46 | 46 |
47 private: | 47 private: |
48 friend class ContentSettingsRegistryTest; | 48 friend class ContentSettingsRegistryTest; |
49 friend struct base::DefaultLazyInstanceTraits<ContentSettingsRegistry>; | 49 friend struct base::LazyInstanceTraitsBase<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; | 57 typedef uint32_t Platforms; |
58 | 58 |
59 // 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 |
(...skipping 10 matching lines...) Expand all Loading... |
70 | 70 |
71 Map content_settings_info_; | 71 Map content_settings_info_; |
72 WebsiteSettingsRegistry* website_settings_registry_; | 72 WebsiteSettingsRegistry* website_settings_registry_; |
73 | 73 |
74 DISALLOW_COPY_AND_ASSIGN(ContentSettingsRegistry); | 74 DISALLOW_COPY_AND_ASSIGN(ContentSettingsRegistry); |
75 }; | 75 }; |
76 | 76 |
77 } // namespace content_settings | 77 } // namespace content_settings |
78 | 78 |
79 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_REGISTRY_H_ | 79 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_REGISTRY_H_ |
OLD | NEW |