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

Side by Side Diff: components/content_settings/core/browser/content_settings_utils.h

Issue 1442083002: Stop inheriting push notification permissions from regular to incognito (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Annotate bool parameters Created 5 years 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 COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_UTILS_H_ 5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_UTILS_H_
6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_UTILS_H_ 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 bool ParseContentSettingValue(const base::Value* value, 71 bool ParseContentSettingValue(const base::Value* value,
72 ContentSetting* setting); 72 ContentSetting* setting);
73 73
74 PatternPair ParsePatternString(const std::string& pattern_str); 74 PatternPair ParsePatternString(const std::string& pattern_str);
75 75
76 std::string CreatePatternString( 76 std::string CreatePatternString(
77 const ContentSettingsPattern& item_pattern, 77 const ContentSettingsPattern& item_pattern,
78 const ContentSettingsPattern& top_level_frame_pattern); 78 const ContentSettingsPattern& top_level_frame_pattern);
79 79
80 // Caller takes the ownership of the returned |base::Value*|. 80 // Caller takes the ownership of the returned |base::Value*|.
81 base::Value* GetContentSettingValueAndPatterns( 81 scoped_ptr<base::Value> GetContentSettingValueAndPatterns(
82 RuleIterator* rule_iterator, 82 RuleIterator* rule_iterator,
83 const GURL& primary_url, 83 const GURL& primary_url,
84 const GURL& secondary_url, 84 const GURL& secondary_url,
85 ContentSettingsPattern* primary_pattern, 85 ContentSettingsPattern* primary_pattern,
86 ContentSettingsPattern* secondary_pattern); 86 ContentSettingsPattern* secondary_pattern);
87 87
88 // Returns a |base::Value*| representation of |setting| if |setting| is 88 // Returns a |base::Value*| representation of |setting| if |setting| is
89 // a valid content setting. Otherwise, returns a nullptr. 89 // a valid content setting. Otherwise, returns a nullptr.
90 scoped_ptr<base::Value> ContentSettingToValue(ContentSetting setting); 90 scoped_ptr<base::Value> ContentSettingToValue(ContentSetting setting);
91 91
92 base::Value* GetContentSettingValueAndPatterns( 92 scoped_ptr<base::Value> GetContentSettingValueAndPatterns(
93 const ProviderInterface* provider, 93 const ProviderInterface* provider,
94 const GURL& primary_url, 94 const GURL& primary_url,
95 const GURL& secondary_url, 95 const GURL& secondary_url,
96 ContentSettingsType content_type, 96 ContentSettingsType content_type,
97 const std::string& resource_identifier, 97 const std::string& resource_identifier,
98 bool include_incognito, 98 bool include_incognito,
99 ContentSettingsPattern* primary_pattern, 99 ContentSettingsPattern* primary_pattern,
100 ContentSettingsPattern* secondary_pattern); 100 ContentSettingsPattern* secondary_pattern);
101 101
102 // Populates |rules| with content setting rules for content types that are 102 // Populates |rules| with content setting rules for content types that are
103 // handled by the renderer. 103 // handled by the renderer.
104 void GetRendererContentSettingRules(const HostContentSettingsMap* map, 104 void GetRendererContentSettingRules(const HostContentSettingsMap* map,
105 RendererContentSettingRules* rules); 105 RendererContentSettingRules* rules);
106 106
107 } // namespace content_settings 107 } // namespace content_settings
108 108
109 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_UTILS_H_ 109 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698