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 // Interface for objects providing content setting rules. | 5 // Interface for objects providing content setting rules. |
6 | 6 |
7 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_RULE_H_ | 7 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_RULE_H_ |
8 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_RULE_H_ | 8 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_RULE_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/linked_ptr.h" | 12 #include "base/memory/linked_ptr.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
15 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
16 #include "base/values.h" | 16 #include "base/values.h" |
17 #include "chrome/common/content_settings.h" | |
18 #include "chrome/common/content_settings_pattern.h" | 17 #include "chrome/common/content_settings_pattern.h" |
19 | 18 |
20 namespace content_settings { | 19 namespace content_settings { |
21 | 20 |
22 struct Rule { | 21 struct Rule { |
23 Rule(); | 22 Rule(); |
24 // Rule takes ownership of |value|. | 23 // Rule takes ownership of |value|. |
25 Rule(const ContentSettingsPattern& primary_pattern, | 24 Rule(const ContentSettingsPattern& primary_pattern, |
26 const ContentSettingsPattern& secondary_pattern, | 25 const ContentSettingsPattern& secondary_pattern, |
27 base::Value* value); | 26 base::Value* value); |
(...skipping 28 matching lines...) Expand all Loading... |
56 virtual bool HasNext() const OVERRIDE; | 55 virtual bool HasNext() const OVERRIDE; |
57 virtual Rule Next() OVERRIDE; | 56 virtual Rule Next() OVERRIDE; |
58 private: | 57 private: |
59 ScopedVector<RuleIterator> iterators_; | 58 ScopedVector<RuleIterator> iterators_; |
60 scoped_ptr<base::AutoLock> auto_lock_; | 59 scoped_ptr<base::AutoLock> auto_lock_; |
61 }; | 60 }; |
62 | 61 |
63 } // namespace content_settings | 62 } // namespace content_settings |
64 | 63 |
65 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_RULE_H_ | 64 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_RULE_H_ |
OLD | NEW |