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

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

Issue 380893005: Add an option page for searching and managing resources and permissions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Last pass. Created 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 10 matching lines...) Expand all
21 21
22 namespace content_settings { 22 namespace content_settings {
23 23
24 class ProviderInterface; 24 class ProviderInterface;
25 class RuleIterator; 25 class RuleIterator;
26 26
27 typedef std::pair<ContentSettingsPattern, ContentSettingsPattern> PatternPair; 27 typedef std::pair<ContentSettingsPattern, ContentSettingsPattern> PatternPair;
28 28
29 std::string GetTypeName(ContentSettingsType type); 29 std::string GetTypeName(ContentSettingsType type);
30 30
31 bool GetTypeFromName(const std::string& name,
32 ContentSettingsType* return_setting);
33
31 // Converts |Value| to |ContentSetting|. 34 // Converts |Value| to |ContentSetting|.
32 ContentSetting ValueToContentSetting(const base::Value* value); 35 ContentSetting ValueToContentSetting(const base::Value* value);
33 36
34 // Converts a |Value| to a |ContentSetting|. Returns true if |value| encodes 37 // Converts a |Value| to a |ContentSetting|. Returns true if |value| encodes
35 // a valid content setting, false otherwise. Note that |CONTENT_SETTING_DEFAULT| 38 // a valid content setting, false otherwise. Note that |CONTENT_SETTING_DEFAULT|
36 // is encoded as a NULL value, so it is not allowed as an integer value. 39 // is encoded as a NULL value, so it is not allowed as an integer value.
37 bool ParseContentSettingValue(const base::Value* value, 40 bool ParseContentSettingValue(const base::Value* value,
38 ContentSetting* setting); 41 ContentSetting* setting);
39 42
40 PatternPair ParsePatternString(const std::string& pattern_str); 43 PatternPair ParsePatternString(const std::string& pattern_str);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 bool include_incognito); 81 bool include_incognito);
79 82
80 // Populates |rules| with content setting rules for content types that are 83 // Populates |rules| with content setting rules for content types that are
81 // handled by the renderer. 84 // handled by the renderer.
82 void GetRendererContentSettingRules(const HostContentSettingsMap* map, 85 void GetRendererContentSettingRules(const HostContentSettingsMap* map,
83 RendererContentSettingRules* rules); 86 RendererContentSettingRules* rules);
84 87
85 } // namespace content_settings 88 } // namespace content_settings
86 89
87 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_ 90 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698