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

Side by Side Diff: chrome/browser/content_settings/content_settings_supervised_provider.h

Issue 902833003: Add a HostContentSettingsMap layer for Supervised Users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Comments Created 5 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_SUPERVISED_PROVIDER_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_SUPERVISED_PROVIDER_H_
7
8 // A content setting provider that is set by the custodian of a supervised user.
9
10 #include "components/content_settings/core/browser/content_settings_binary_value _map.h"
11 #include "components/content_settings/core/browser/content_settings_observable_p rovider.h"
12
13 class PrefService;
14
15 namespace base {
16 class Lock;
Bernhard Bauer 2015/02/26 18:03:54 This class has a base::Lock member, so the fact th
knn 2015/02/27 10:43:53 Done.
Bernhard Bauer 2015/02/27 11:20:25 Include the header file here pls? (You can then re
knn 2015/02/27 12:05:14 Done.
17 }
18
19 namespace content_settings {
20
21 // SupervisedProvider that provides content-settings managed by the custodian
22 // of a supervised user.
23 class SupervisedProvider : public ObservableProvider {
24 public:
25 // ProviderInterface implementations.
26 RuleIterator* GetRuleIterator(ContentSettingsType content_type,
27 const ResourceIdentifier& resource_identifier,
28 bool incognito) const override;
29
30 bool SetWebsiteSetting(const ContentSettingsPattern& primary_pattern,
31 const ContentSettingsPattern& secondary_pattern,
32 ContentSettingsType content_type,
33 const ResourceIdentifier& resource_identifier,
34 base::Value* value) override;
35
36 void ClearAllContentSettingsRules(ContentSettingsType content_type) override;
37
38 void ShutdownOnUIThread() override;
39
40 // Callback on receiving settings from the supervised user settings service.
41 void OnSupervisedSettingsAvailable(const base::DictionaryValue* settings);
42
43 private:
44 BinaryValueMap value_map_;
45
46 // Used around accesses to the |value_map_| object to guarantee
47 // thread safety.
48 mutable base::Lock lock_;
49 };
50
51 } // namespace content_settings
52
53 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_SUPERVISED_PROVIDER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698