| Index: components/content_settings/core/browser/content_settings_info.cc
|
| diff --git a/components/content_settings/core/browser/content_settings_info.cc b/components/content_settings/core/browser/content_settings_info.cc
|
| index 01fee49a33bf9d1be57c190d346d4afa900dd8be..10d3143ec2917c4601fce180aec2732e743660a5 100644
|
| --- a/components/content_settings/core/browser/content_settings_info.cc
|
| +++ b/components/content_settings/core/browser/content_settings_info.cc
|
| @@ -2,16 +2,25 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include <algorithm>
|
| +
|
| #include "components/content_settings/core/browser/content_settings_info.h"
|
|
|
| namespace content_settings {
|
|
|
| ContentSettingsInfo::ContentSettingsInfo(
|
| const WebsiteSettingsInfo* website_settings_info,
|
| - const std::vector<std::string>& whitelisted_schemes)
|
| + const std::vector<std::string>& whitelisted_schemes,
|
| + const std::vector<ContentSetting>& valid_settings)
|
| : website_settings_info_(website_settings_info),
|
| - whitelisted_schemes_(whitelisted_schemes) {}
|
| + whitelisted_schemes_(whitelisted_schemes),
|
| + valid_settings_(valid_settings) {}
|
|
|
| ContentSettingsInfo::~ContentSettingsInfo() {}
|
|
|
| +bool ContentSettingsInfo::IsSettingValid(ContentSetting setting) const {
|
| + return std::find(valid_settings_.begin(), valid_settings_.end(), setting) !=
|
| + valid_settings_.end();
|
| +}
|
| +
|
| } // namespace content_settings
|
|
|