| 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 #include "components/content_settings/core/browser/content_settings_info.h" | 5 #include "components/content_settings/core/browser/content_settings_info.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" |
| 8 |
| 7 namespace content_settings { | 9 namespace content_settings { |
| 8 | 10 |
| 9 ContentSettingsInfo::ContentSettingsInfo( | 11 ContentSettingsInfo::ContentSettingsInfo( |
| 10 const WebsiteSettingsInfo* website_settings_info, | 12 const WebsiteSettingsInfo* website_settings_info, |
| 11 const std::vector<std::string>& whitelisted_schemes) | 13 const std::vector<std::string>& whitelisted_schemes, |
| 14 const std::set<ContentSetting>& valid_settings) |
| 12 : website_settings_info_(website_settings_info), | 15 : website_settings_info_(website_settings_info), |
| 13 whitelisted_schemes_(whitelisted_schemes) {} | 16 whitelisted_schemes_(whitelisted_schemes), |
| 17 valid_settings_(valid_settings) {} |
| 14 | 18 |
| 15 ContentSettingsInfo::~ContentSettingsInfo() {} | 19 ContentSettingsInfo::~ContentSettingsInfo() {} |
| 16 | 20 |
| 21 bool ContentSettingsInfo::IsSettingValid(ContentSetting setting) const { |
| 22 return ContainsKey(valid_settings_, setting); |
| 23 } |
| 24 |
| 17 } // namespace content_settings | 25 } // namespace content_settings |
| OLD | NEW |