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

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

Issue 475193002: Add a single site view page to view and modify content settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 4 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 13 matching lines...) Expand all
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, 31 bool GetTypeFromName(const std::string& name,
32 ContentSettingsType* return_setting); 32 ContentSettingsType* return_setting);
33 33
34 std::string ContentSettingToString(ContentSetting setting);
35
36 ContentSetting ContentSettingFromString(const std::string& name);
37
34 // Converts |Value| to |ContentSetting|. 38 // Converts |Value| to |ContentSetting|.
35 ContentSetting ValueToContentSetting(const base::Value* value); 39 ContentSetting ValueToContentSetting(const base::Value* value);
36 40
37 // Converts a |Value| to a |ContentSetting|. Returns true if |value| encodes 41 // Converts a |Value| to a |ContentSetting|. Returns true if |value| encodes
38 // a valid content setting, false otherwise. Note that |CONTENT_SETTING_DEFAULT| 42 // a valid content setting, false otherwise. Note that |CONTENT_SETTING_DEFAULT|
39 // is encoded as a NULL value, so it is not allowed as an integer value. 43 // is encoded as a NULL value, so it is not allowed as an integer value.
40 bool ParseContentSettingValue(const base::Value* value, 44 bool ParseContentSettingValue(const base::Value* value,
41 ContentSetting* setting); 45 ContentSetting* setting);
42 46
43 PatternPair ParsePatternString(const std::string& pattern_str); 47 PatternPair ParsePatternString(const std::string& pattern_str);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 bool include_incognito); 85 bool include_incognito);
82 86
83 // Populates |rules| with content setting rules for content types that are 87 // Populates |rules| with content setting rules for content types that are
84 // handled by the renderer. 88 // handled by the renderer.
85 void GetRendererContentSettingRules(const HostContentSettingsMap* map, 89 void GetRendererContentSettingRules(const HostContentSettingsMap* map,
86 RendererContentSettingRules* rules); 90 RendererContentSettingRules* rules);
87 91
88 } // namespace content_settings 92 } // namespace content_settings
89 93
90 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_ 94 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/content_settings/content_settings_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698