Chromium Code Reviews| Index: components/content_settings/core/browser/content_settings_binary_value_map.h |
| diff --git a/components/content_settings/core/browser/content_settings_binary_value_map.h b/components/content_settings/core/browser/content_settings_binary_value_map.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..91bfb2bf4631cd8299384711f29e1253046c823c |
| --- /dev/null |
| +++ b/components/content_settings/core/browser/content_settings_binary_value_map.h |
| @@ -0,0 +1,41 @@ |
| +// Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_BINARY_VALUE_MAP_H_ |
| +#define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_BINARY_VALUE_MAP_H_ |
| + |
| +#include "components/content_settings/core/browser/content_settings_provider.h" |
| +#include "components/content_settings/core/common/content_settings_types.h" |
| + |
| +namespace base { |
| + |
| +class AutoLock; |
|
Bernhard Bauer
2015/02/05 12:07:51
Nit: The empty lines around this line aren't neces
knn
2015/02/26 12:07:29
Done.
|
| + |
| +} // namespace base |
| + |
| +namespace content_settings { |
| + |
| +class RuleIterator; |
| + |
| +// A simplified value map that can be used to disable or enable the entire |
| +// Content Setting. The default behaviour is enabling the Content Setting if |
| +// it is not set explicitly. |
| +class BinaryValueMap { |
| + public: |
| + BinaryValueMap(); |
| + |
| + RuleIterator* GetRuleIterator(ContentSettingsType content_type, |
|
Bernhard Bauer
2015/02/05 12:07:51
Make this return a scoped_ptr?
knn
2015/02/26 12:07:29
This is a ProviderInterface implementation. Needs
Bernhard Bauer
2015/02/26 12:44:57
Wait, this class doesn't implement an interface. I
|
| + const ResourceIdentifier& resource_identifier, |
| + scoped_ptr<base::AutoLock> lock) const; |
| + void SetContentSettingDisabled(ContentSettingsType content_type, |
| + bool disabled); |
| + bool IsContentSettingEnabled(ContentSettingsType content_type) const; |
| + |
| + private: |
| + bool is_enabled_[CONTENT_SETTINGS_NUM_TYPES]; |
| +}; |
| + |
| +} // namespace content_settings |
| + |
| +#endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_BINARY_VALUE_MAP_H_ |