OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_BROWSING_DATA_BROWSING_DATA_FILTER_BUILDER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_FILTER_BUILDER_H_ |
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_FILTER_BUILDER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_FILTER_BUILDER_H_ |
7 | 7 |
8 #include <ostream> | 8 #include <ostream> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // Builds a filter that matches cookies whose sources are in the whitelist, | 60 // Builds a filter that matches cookies whose sources are in the whitelist, |
61 // or aren't in the blacklist. | 61 // or aren't in the blacklist. |
62 virtual base::Callback<bool(const net::CanonicalCookie& pattern)> | 62 virtual base::Callback<bool(const net::CanonicalCookie& pattern)> |
63 BuildCookieFilter() const = 0; | 63 BuildCookieFilter() const = 0; |
64 | 64 |
65 // Builds a filter that matches channel IDs whose server identifiers are in | 65 // Builds a filter that matches channel IDs whose server identifiers are in |
66 // the whitelist, or aren't in the blacklist. | 66 // the whitelist, or aren't in the blacklist. |
67 virtual base::Callback<bool(const std::string& server_id)> | 67 virtual base::Callback<bool(const std::string& server_id)> |
68 BuildChannelIDFilter() const = 0; | 68 BuildChannelIDFilter() const = 0; |
69 | 69 |
| 70 // Builds a filter that matches the |site| of a plugin. |
| 71 virtual base::Callback<bool(const std::string& site)> |
| 72 BuildPluginFilter() const = 0; |
| 73 |
70 // A convenience method to produce an empty blacklist, a filter that matches | 74 // A convenience method to produce an empty blacklist, a filter that matches |
71 // everything. | 75 // everything. |
72 static base::Callback<bool(const GURL&)> BuildNoopFilter(); | 76 static base::Callback<bool(const GURL&)> BuildNoopFilter(); |
73 | 77 |
74 protected: | 78 protected: |
75 Mode mode() const { return mode_; } | 79 Mode mode() const { return mode_; } |
76 | 80 |
77 // Whether or not any URLs have been added to this builder. | 81 // Whether or not any URLs have been added to this builder. |
78 virtual bool IsEmpty() const = 0; | 82 virtual bool IsEmpty() const = 0; |
79 | 83 |
80 private: | 84 private: |
81 Mode mode_; | 85 Mode mode_; |
82 | 86 |
83 DISALLOW_COPY_AND_ASSIGN(BrowsingDataFilterBuilder); | 87 DISALLOW_COPY_AND_ASSIGN(BrowsingDataFilterBuilder); |
84 }; | 88 }; |
85 | 89 |
86 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_FILTER_BUILDER_H_ | 90 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_FILTER_BUILDER_H_ |
OLD | NEW |