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

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

Issue 8539004: Replace SetContentSetting method of the content_settings::Provider interface with GetWebsiteSetting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 1 month 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_UTILS_H_ 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_ 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 21 matching lines...) Expand all
32 bool SupportsResourceIdentifier(ContentSettingsType content_type); 32 bool SupportsResourceIdentifier(ContentSettingsType content_type);
33 33
34 // Maps CONTENT_SETTING_ASK for the CONTENT_SETTINGS_TYPE_PLUGINS to 34 // Maps CONTENT_SETTING_ASK for the CONTENT_SETTINGS_TYPE_PLUGINS to
35 // CONTENT_SETTING_BLOCK if click-to-play is not enabled. 35 // CONTENT_SETTING_BLOCK if click-to-play is not enabled.
36 ContentSetting ClickToPlayFixup(ContentSettingsType content_type, 36 ContentSetting ClickToPlayFixup(ContentSettingsType content_type,
37 ContentSetting setting); 37 ContentSetting setting);
38 38
39 // Converts |Value| to |ContentSetting|. 39 // Converts |Value| to |ContentSetting|.
40 ContentSetting ValueToContentSetting(const base::Value* value); 40 ContentSetting ValueToContentSetting(const base::Value* value);
41 41
42 // Tests whether the |value| equals the |setting|. If |value| is not an
Bernhard Bauer 2011/11/11 14:00:40 Nit: "a |FundamentalValue|" (not "an").
markusheintz_ 2011/11/14 11:15:10 Method removed.
43 // |FundamentalValue| or NULL false is returned.
44 bool ValueEqualsContentSetting(const base::Value* value,
45 ContentSetting setting);
46
42 // Converts a |Value| to a |ContentSetting|. Returns true if |value| encodes 47 // Converts a |Value| to a |ContentSetting|. Returns true if |value| encodes
43 // a valid content setting, false otherwise. Note that |CONTENT_SETTING_DEFAULT| 48 // a valid content setting, false otherwise. Note that |CONTENT_SETTING_DEFAULT|
44 // is encoded as a NULL value, so it is not allowed as an integer value. 49 // is encoded as a NULL value, so it is not allowed as an integer value.
45 bool ParseContentSettingValue(const base::Value* value, 50 bool ParseContentSettingValue(const base::Value* value,
46 ContentSetting* setting); 51 ContentSetting* setting);
47 52
48 PatternPair ParsePatternString(const std::string& pattern_str); 53 PatternPair ParsePatternString(const std::string& pattern_str);
49 54
50 std::string CreatePatternString( 55 std::string CreatePatternString(
51 const ContentSettingsPattern& item_pattern, 56 const ContentSettingsPattern& item_pattern,
(...skipping 29 matching lines...) Expand all
81 const ProviderInterface* provider, 86 const ProviderInterface* provider,
82 const GURL& primary_url, 87 const GURL& primary_url,
83 const GURL& secondary_url, 88 const GURL& secondary_url,
84 ContentSettingsType content_type, 89 ContentSettingsType content_type,
85 const std::string& resource_identifier, 90 const std::string& resource_identifier,
86 bool include_incognito); 91 bool include_incognito);
87 92
88 } // namespace content_settings 93 } // namespace content_settings
89 94
90 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_ 95 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698