Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(626)

Unified Diff: components/content_settings/core/browser/content_settings_binary_value_map.h

Issue 902833003: Add a HostContentSettingsMap layer for Supervised Users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698