| 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 <set> |
| 8 #include <string> | 9 #include <string> |
| 10 #include <vector> |
| 9 | 11 |
| 10 #include "base/containers/scoped_ptr_map.h" | 12 #include "base/containers/scoped_ptr_map.h" |
| 11 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
| 12 #include "base/macros.h" | 14 #include "base/macros.h" |
| 13 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 14 #include "components/content_settings/core/browser/content_settings_info.h" | 16 #include "components/content_settings/core/browser/content_settings_info.h" |
| 15 #include "components/content_settings/core/browser/content_settings_utils.h" | 17 #include "components/content_settings/core/browser/content_settings_utils.h" |
| 16 #include "components/content_settings/core/browser/website_settings_info.h" | 18 #include "components/content_settings/core/browser/website_settings_info.h" |
| 17 #include "components/content_settings/core/common/content_settings.h" | 19 #include "components/content_settings/core/common/content_settings.h" |
| 18 #include "components/content_settings/core/common/content_settings_types.h" | 20 #include "components/content_settings/core/common/content_settings_types.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 ~ContentSettingsRegistry(); | 53 ~ContentSettingsRegistry(); |
| 52 | 54 |
| 53 void Init(); | 55 void Init(); |
| 54 | 56 |
| 55 // Register a new content setting. This maps an origin to an ALLOW/ASK/BLOCK | 57 // Register a new content setting. This maps an origin to an ALLOW/ASK/BLOCK |
| 56 // value (see the ContentSetting enum). | 58 // value (see the ContentSetting enum). |
| 57 void Register(ContentSettingsType type, | 59 void Register(ContentSettingsType type, |
| 58 const std::string& name, | 60 const std::string& name, |
| 59 ContentSetting initial_default_value, | 61 ContentSetting initial_default_value, |
| 60 WebsiteSettingsInfo::SyncStatus sync_status, | 62 WebsiteSettingsInfo::SyncStatus sync_status, |
| 61 const std::vector<std::string>& whitelisted_schemes); | 63 const std::vector<std::string>& whitelisted_schemes, |
| 64 const std::set<ContentSetting>& valid_settings); |
| 62 | 65 |
| 63 Map content_settings_info_; | 66 Map content_settings_info_; |
| 64 WebsiteSettingsRegistry* website_settings_registry_; | 67 WebsiteSettingsRegistry* website_settings_registry_; |
| 65 | 68 |
| 66 DISALLOW_COPY_AND_ASSIGN(ContentSettingsRegistry); | 69 DISALLOW_COPY_AND_ASSIGN(ContentSettingsRegistry); |
| 67 }; | 70 }; |
| 68 | 71 |
| 69 } // namespace content_settings | 72 } // namespace content_settings |
| 70 | 73 |
| 71 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_REGISTRY_H_ | 74 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_REGISTRY_H_ |
| OLD | NEW |