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