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

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

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 8 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_POLICY_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_POLICY_PROVIDER_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_POLICY_PROVIDER_H_ 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_POLICY_PROVIDER_H_
7 7
8 // A content settings provider that takes its settings out of policies. 8 // A content settings provider that takes its settings out of policies.
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/prefs/public/pref_change_registrar.h" 13 #include "base/prefs/public/pref_change_registrar.h"
14 #include "base/synchronization/lock.h" 14 #include "base/synchronization/lock.h"
15 #include "chrome/browser/content_settings/content_settings_observable_provider.h " 15 #include "chrome/browser/content_settings/content_settings_observable_provider.h "
16 #include "chrome/browser/content_settings/content_settings_origin_identifier_val ue_map.h" 16 #include "chrome/browser/content_settings/content_settings_origin_identifier_val ue_map.h"
17 17
18 class PrefService; 18 class PrefService;
19 class PrefServiceSyncable;
19 20
20 namespace content_settings { 21 namespace content_settings {
21 22
22 // PolicyProvider that provides managed content-settings. 23 // PolicyProvider that provides managed content-settings.
23 class PolicyProvider : public ObservableProvider { 24 class PolicyProvider : public ObservableProvider {
24 public: 25 public:
25 explicit PolicyProvider(PrefService* prefs); 26 explicit PolicyProvider(PrefService* prefs);
26 virtual ~PolicyProvider(); 27 virtual ~PolicyProvider();
27 static void RegisterUserPrefs(PrefService* prefs); 28 static void RegisterUserPrefs(PrefServiceSyncable* prefs);
28 29
29 // ProviderInterface implementations. 30 // ProviderInterface implementations.
30 virtual RuleIterator* GetRuleIterator( 31 virtual RuleIterator* GetRuleIterator(
31 ContentSettingsType content_type, 32 ContentSettingsType content_type,
32 const ResourceIdentifier& resource_identifier, 33 const ResourceIdentifier& resource_identifier,
33 bool incognito) const OVERRIDE; 34 bool incognito) const OVERRIDE;
34 35
35 virtual bool SetWebsiteSetting( 36 virtual bool SetWebsiteSetting(
36 const ContentSettingsPattern& primary_pattern, 37 const ContentSettingsPattern& primary_pattern,
37 const ContentSettingsPattern& secondary_pattern, 38 const ContentSettingsPattern& secondary_pattern,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Used around accesses to the |value_map_| object to guarantee 73 // Used around accesses to the |value_map_| object to guarantee
73 // thread safety. 74 // thread safety.
74 mutable base::Lock lock_; 75 mutable base::Lock lock_;
75 76
76 DISALLOW_COPY_AND_ASSIGN(PolicyProvider); 77 DISALLOW_COPY_AND_ASSIGN(PolicyProvider);
77 }; 78 };
78 79
79 } // namespace content_settings 80 } // namespace content_settings
80 81
81 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_POLICY_PROVIDER_H_ 82 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_POLICY_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698