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_REGISTRY_H_ | 5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_REGISTRY_H_ |
6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_REGISTRY_H_ | 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_REGISTRY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/containers/scoped_ptr_map.h" | 10 #include "base/containers/scoped_ptr_map.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 // Register a new website setting. This maps an origin to an arbitrary | 41 // Register a new website setting. This maps an origin to an arbitrary |
42 // base::Value. Returns a pointer to the registered WebsiteSettingsInfo which | 42 // base::Value. Returns a pointer to the registered WebsiteSettingsInfo which |
43 // is owned by the registry. | 43 // is owned by the registry. |
44 const WebsiteSettingsInfo* Register( | 44 const WebsiteSettingsInfo* Register( |
45 ContentSettingsType type, | 45 ContentSettingsType type, |
46 const std::string& name, | 46 const std::string& name, |
47 scoped_ptr<base::Value> initial_default_value, | 47 scoped_ptr<base::Value> initial_default_value, |
48 WebsiteSettingsInfo::SyncStatus sync_status, | 48 WebsiteSettingsInfo::SyncStatus sync_status, |
49 WebsiteSettingsInfo::LossyStatus lossy_status, | 49 WebsiteSettingsInfo::LossyStatus lossy_status, |
50 WebsiteSettingsInfo::ScopingType scoping_type); | 50 WebsiteSettingsInfo::ScopingType scoping_type, |
| 51 WebsiteSettingsInfo::IncognitoBehavior incognito_behavior); |
51 | 52 |
52 const_iterator begin() const; | 53 const_iterator begin() const; |
53 const_iterator end() const; | 54 const_iterator end() const; |
54 | 55 |
55 private: | 56 private: |
56 friend class ContentSettingsRegistryTest; | 57 friend class ContentSettingsRegistryTest; |
57 friend class WebsiteSettingsRegistryTest; | 58 friend class WebsiteSettingsRegistryTest; |
58 friend struct base::DefaultLazyInstanceTraits<WebsiteSettingsRegistry>; | 59 friend struct base::DefaultLazyInstanceTraits<WebsiteSettingsRegistry>; |
59 | 60 |
60 WebsiteSettingsRegistry(); | 61 WebsiteSettingsRegistry(); |
61 ~WebsiteSettingsRegistry(); | 62 ~WebsiteSettingsRegistry(); |
62 | 63 |
63 void Init(); | 64 void Init(); |
64 | 65 |
65 Map website_settings_info_; | 66 Map website_settings_info_; |
66 | 67 |
67 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsRegistry); | 68 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsRegistry); |
68 }; | 69 }; |
69 | 70 |
70 } // namespace content_settings | 71 } // namespace content_settings |
71 | 72 |
72 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_REGISTRY_H_ | 73 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_REGISTRY_H_ |
OLD | NEW |