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

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

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 | 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 #pragma once 7 #pragma once
8 8
9 // A content settings provider that takes its settings out of policies. 9 // A content settings provider that takes its settings out of policies.
10 10
(...skipping 24 matching lines...) Expand all
35 // DefaultContentSettingsProvider implementation. 35 // DefaultContentSettingsProvider implementation.
36 virtual ContentSetting ProvideDefaultSetting( 36 virtual ContentSetting ProvideDefaultSetting(
37 ContentSettingsType content_type) const; 37 ContentSettingsType content_type) const;
38 virtual void UpdateDefaultSetting(ContentSettingsType content_type, 38 virtual void UpdateDefaultSetting(ContentSettingsType content_type,
39 ContentSetting setting); 39 ContentSetting setting);
40 virtual bool DefaultSettingIsManaged(ContentSettingsType content_type) const; 40 virtual bool DefaultSettingIsManaged(ContentSettingsType content_type) const;
41 41
42 static void RegisterUserPrefs(PrefService* prefs); 42 static void RegisterUserPrefs(PrefService* prefs);
43 43
44 // NotificationObserver implementation. 44 // NotificationObserver implementation.
45 virtual void Observe(NotificationType type, 45 virtual void Observe(int type,
46 const NotificationSource& source, 46 const NotificationSource& source,
47 const NotificationDetails& details); 47 const NotificationDetails& details);
48 48
49 private: 49 private:
50 // Informs observers that content settings have changed. Make sure that 50 // Informs observers that content settings have changed. Make sure that
51 // |lock_| is not held when calling this, as listeners will usually call one 51 // |lock_| is not held when calling this, as listeners will usually call one
52 // of the GetSettings functions in response, which would then lead to a 52 // of the GetSettings functions in response, which would then lead to a
53 // mutex deadlock. 53 // mutex deadlock.
54 void NotifyObservers(const ContentSettingsDetails& details); 54 void NotifyObservers(const ContentSettingsDetails& details);
55 55
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 virtual void GetAllContentSettingsRules( 107 virtual void GetAllContentSettingsRules(
108 ContentSettingsType content_type, 108 ContentSettingsType content_type,
109 const ResourceIdentifier& resource_identifier, 109 const ResourceIdentifier& resource_identifier,
110 Rules* content_setting_rules) const; 110 Rules* content_setting_rules) const;
111 111
112 virtual void ClearAllContentSettingsRules( 112 virtual void ClearAllContentSettingsRules(
113 ContentSettingsType content_type); 113 ContentSettingsType content_type);
114 114
115 // NotificationObserver implementation. 115 // NotificationObserver implementation.
116 virtual void Observe(NotificationType type, 116 virtual void Observe(int type,
117 const NotificationSource& source, 117 const NotificationSource& source,
118 const NotificationDetails& details); 118 const NotificationDetails& details);
119 private: 119 private:
120 typedef Tuple5< 120 typedef Tuple5<
121 ContentSettingsPattern, 121 ContentSettingsPattern,
122 ContentSettingsPattern, 122 ContentSettingsPattern,
123 ContentSettingsType, 123 ContentSettingsType,
124 ResourceIdentifier, 124 ResourceIdentifier,
125 ContentSetting> ContentSettingsRule; 125 ContentSetting> ContentSettingsRule;
126 126
(...skipping 24 matching lines...) Expand all
151 // Used around accesses to the content_settings_ object to guarantee 151 // Used around accesses to the content_settings_ object to guarantee
152 // thread safety. 152 // thread safety.
153 mutable base::Lock lock_; 153 mutable base::Lock lock_;
154 154
155 DISALLOW_COPY_AND_ASSIGN(PolicyProvider); 155 DISALLOW_COPY_AND_ASSIGN(PolicyProvider);
156 }; 156 };
157 157
158 } // namespace content_settings 158 } // namespace content_settings
159 159
160 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_POLICY_PROVIDER_H_ 160 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_POLICY_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698