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

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

Issue 6410022: Add content_settings::PrefProvider to HostContentSettingsMap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/content_settings/host_content_settings_map.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Interface for objects providing content setting rules. 5 // Interface for objects providing content setting rules.
6 6
7 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ 7 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_
8 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ 8 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_
9 #pragma once 9 #pragma once
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 struct Rule { 50 struct Rule {
51 Rule() {} 51 Rule() {}
52 Rule(const ContentSettingsPattern& requesting_pattern, 52 Rule(const ContentSettingsPattern& requesting_pattern,
53 const ContentSettingsPattern& embedding_pattern, 53 const ContentSettingsPattern& embedding_pattern,
54 ContentSetting setting) 54 ContentSetting setting)
55 : requesting_url_pattern(requesting_pattern), 55 : requesting_url_pattern(requesting_pattern),
56 embedding_url_pattern(embedding_pattern), 56 embedding_url_pattern(embedding_pattern),
57 content_setting(setting) {} 57 content_setting(setting) {}
58 58
59 const ContentSettingsPattern requesting_url_pattern; 59 ContentSettingsPattern requesting_url_pattern;
60 const ContentSettingsPattern embedding_url_pattern; 60 ContentSettingsPattern embedding_url_pattern;
61 ContentSetting content_setting; 61 ContentSetting content_setting;
62 }; 62 };
63 63
64 typedef std::vector<Rule> Rules; 64 typedef std::vector<Rule> Rules;
65 65
66 virtual ~ProviderInterface() {} 66 virtual ~ProviderInterface() {}
67 67
68 // Returns a single ContentSetting which applies to a given |requesting_url|, 68 // Returns a single ContentSetting which applies to a given |requesting_url|,
69 // |embedding_url| pair or CONTENT_SETTING_DEFAULT, if no rule applies. For 69 // |embedding_url| pair or CONTENT_SETTING_DEFAULT, if no rule applies. For
70 // ContentSettingsTypes that require a resource identifier to be specified, 70 // ContentSettingsTypes that require a resource identifier to be specified,
(...skipping 26 matching lines...) Expand all
97 // from the corresponding regular provider. For ContentSettingsTypes that 97 // from the corresponding regular provider. For ContentSettingsTypes that
98 // require a resource identifier to be specified, the |resource_identifier| 98 // require a resource identifier to be specified, the |resource_identifier|
99 // must be non-empty. 99 // must be non-empty.
100 // 100 //
101 // This may be called on any thread. 101 // This may be called on any thread.
102 virtual void GetAllContentSettingsRules( 102 virtual void GetAllContentSettingsRules(
103 ContentSettingsType content_type, 103 ContentSettingsType content_type,
104 const ResourceIdentifier& resource_identifier, 104 const ResourceIdentifier& resource_identifier,
105 Rules* content_setting_rules) const = 0; 105 Rules* content_setting_rules) const = 0;
106 106
107 // Resets all content settings to CONTENT_SETTING_DEFAULT. 107 // Resets all content settings for the given |content_type| to
108 // CONTENT_SETTING_DEFAULT. For content types that require a resource
109 // identifier all content settings for any resource identifieres of the given
110 // |content_type| will be reset to CONTENT_SETTING_DEFAULT.
108 // 111 //
109 // This should only be called on the UI thread. 112 // This should only be called on the UI thread.
110 virtual void ClearAllContentSettingsRules() = 0; 113 virtual void ClearAllContentSettingsRules(
114 ContentSettingsType content_type) = 0;
115
116 // Resets all content settings to CONTENT_SETTINGS_DEFAULT.
117 //
118 // This should only be called on the UI thread.
119 virtual void ResetToDefaults() = 0;
111 }; 120 };
112 121
113 } // namespace content_settings 122 } // namespace content_settings
114 123
115 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_ 124 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/content_settings/host_content_settings_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698