| 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_INFO_H_ | 5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_INFO_H_ |
| 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_INFO_H_ | 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_INFO_H_ |
| 7 | 7 |
| 8 #include <set> |
| 8 #include <string> | 9 #include <string> |
| 9 #include <vector> | 10 #include <vector> |
| 10 | 11 |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "components/content_settings/core/common/content_settings.h" |
| 12 | 14 |
| 13 namespace content_settings { | 15 namespace content_settings { |
| 14 | 16 |
| 15 class WebsiteSettingsInfo; | 17 class WebsiteSettingsInfo; |
| 16 | 18 |
| 17 class ContentSettingsInfo { | 19 class ContentSettingsInfo { |
| 18 public: | 20 public: |
| 19 // This object does not take ownership of |website_settings_info|. | 21 // This object does not take ownership of |website_settings_info|. |
| 20 ContentSettingsInfo(const WebsiteSettingsInfo* website_settings_info, | 22 ContentSettingsInfo(const WebsiteSettingsInfo* website_settings_info, |
| 21 const std::vector<std::string>& whitelisted_schemes); | 23 const std::vector<std::string>& whitelisted_schemes, |
| 24 const std::set<ContentSetting>& valid_settings); |
| 22 ~ContentSettingsInfo(); | 25 ~ContentSettingsInfo(); |
| 23 | 26 |
| 24 const WebsiteSettingsInfo* website_settings_info() const { | 27 const WebsiteSettingsInfo* website_settings_info() const { |
| 25 return website_settings_info_; | 28 return website_settings_info_; |
| 26 } | 29 } |
| 27 const std::vector<std::string>& whitelisted_schemes() const { | 30 const std::vector<std::string>& whitelisted_schemes() const { |
| 28 return whitelisted_schemes_; | 31 return whitelisted_schemes_; |
| 29 } | 32 } |
| 30 | 33 |
| 34 bool IsSettingValid(ContentSetting setting) const; |
| 35 |
| 31 private: | 36 private: |
| 32 const WebsiteSettingsInfo* website_settings_info_; | 37 const WebsiteSettingsInfo* website_settings_info_; |
| 33 std::vector<std::string> whitelisted_schemes_; | 38 const std::vector<std::string> whitelisted_schemes_; |
| 39 const std::set<ContentSetting> valid_settings_; |
| 34 | 40 |
| 35 DISALLOW_COPY_AND_ASSIGN(ContentSettingsInfo); | 41 DISALLOW_COPY_AND_ASSIGN(ContentSettingsInfo); |
| 36 }; | 42 }; |
| 37 | 43 |
| 38 } // namespace content_settings | 44 } // namespace content_settings |
| 39 | 45 |
| 40 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_INFO_H_ | 46 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_INFO_H_ |
| OLD | NEW |