OLD | NEW |
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 |
11 #include "chrome/common/content_settings.h" | 11 #include "chrome/common/content_settings.h" |
12 #include "chrome/common/content_settings_pattern.h" | 12 #include "chrome/common/content_settings_pattern.h" |
13 #include "chrome/common/content_settings_types.h" | 13 #include "chrome/common/content_settings_types.h" |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 class Value; | 16 class Value; |
17 } | 17 } |
18 | 18 |
19 class GURL; | 19 class GURL; |
| 20 class HostContentSettingsMap; |
20 | 21 |
21 namespace content_settings { | 22 namespace content_settings { |
22 | 23 |
23 class ProviderInterface; | 24 class ProviderInterface; |
24 class RuleIterator; | 25 class RuleIterator; |
25 | 26 |
26 typedef std::pair<ContentSettingsPattern, ContentSettingsPattern> PatternPair; | 27 typedef std::pair<ContentSettingsPattern, ContentSettingsPattern> PatternPair; |
27 | 28 |
28 std::string GetTypeName(ContentSettingsType type); | 29 std::string GetTypeName(ContentSettingsType type); |
29 | 30 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 bool include_incognito); | 79 bool include_incognito); |
79 | 80 |
80 ContentSetting GetContentSetting( | 81 ContentSetting GetContentSetting( |
81 const ProviderInterface* provider, | 82 const ProviderInterface* provider, |
82 const GURL& primary_url, | 83 const GURL& primary_url, |
83 const GURL& secondary_url, | 84 const GURL& secondary_url, |
84 ContentSettingsType content_type, | 85 ContentSettingsType content_type, |
85 const std::string& resource_identifier, | 86 const std::string& resource_identifier, |
86 bool include_incognito); | 87 bool include_incognito); |
87 | 88 |
| 89 // Populates |rules| with content setting rules for content types that are |
| 90 // handled by the renderer. |
| 91 void GetRendererContentSettingRules(const HostContentSettingsMap* map, |
| 92 RendererContentSettingRules* rules); |
| 93 |
88 } // namespace content_settings | 94 } // namespace content_settings |
89 | 95 |
90 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_ | 96 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_ |
OLD | NEW |