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

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

Issue 2511973004: components: Cleanup class/struct fwd declarations (Closed)
Patch Set: Rebase on top of current master branch Created 4 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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "components/content_settings/core/common/content_settings.h" 13 #include "components/content_settings/core/common/content_settings.h"
14 #include "components/content_settings/core/common/content_settings_pattern.h" 14 #include "components/content_settings/core/common/content_settings_pattern.h"
15 #include "components/content_settings/core/common/content_settings_types.h" 15 #include "components/content_settings/core/common/content_settings_types.h"
16 16
17 namespace base { 17 namespace base {
18 class Value; 18 class Value;
19 } 19 }
20 20
21 class GURL;
22 class HostContentSettingsMap; 21 class HostContentSettingsMap;
23 22
24 namespace content_settings { 23 namespace content_settings {
25 24
26 class ProviderInterface;
27 class RuleIterator;
28
29 typedef std::pair<ContentSettingsPattern, ContentSettingsPattern> PatternPair; 25 typedef std::pair<ContentSettingsPattern, ContentSettingsPattern> PatternPair;
30 26
31 // Helper class to iterate over only the values in a map. 27 // Helper class to iterate over only the values in a map.
32 template <typename IteratorType, typename ReferenceType> 28 template <typename IteratorType, typename ReferenceType>
33 class MapValueIterator { 29 class MapValueIterator {
34 public: 30 public:
35 explicit MapValueIterator(IteratorType iterator) : iterator_(iterator) {} 31 explicit MapValueIterator(IteratorType iterator) : iterator_(iterator) {}
36 32
37 bool operator!=(const MapValueIterator& other) const { 33 bool operator!=(const MapValueIterator& other) const {
38 return iterator_ != other.iterator_; 34 return iterator_ != other.iterator_;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // handled by the renderer. 81 // handled by the renderer.
86 void GetRendererContentSettingRules(const HostContentSettingsMap* map, 82 void GetRendererContentSettingRules(const HostContentSettingsMap* map,
87 RendererContentSettingRules* rules); 83 RendererContentSettingRules* rules);
88 84
89 // Returns true if setting |a| is more permissive than setting |b|. 85 // Returns true if setting |a| is more permissive than setting |b|.
90 bool IsMorePermissive(ContentSetting a, ContentSetting b); 86 bool IsMorePermissive(ContentSetting a, ContentSetting b);
91 87
92 } // namespace content_settings 88 } // namespace content_settings
93 89
94 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_UTILS_H_ 90 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_CONTENT_SETTINGS_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698