OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SUPERVISED_USER_SUPERVISED_USER_URL_FILTER_H_ | 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_URL_FILTER_H_ |
6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_URL_FILTER_H_ | 6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_URL_FILTER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
17 #include "base/threading/non_thread_safe.h" | 17 #include "base/threading/non_thread_safe.h" |
18 #include "base/values.h" | 18 #include "base/values.h" |
19 #include "chrome/browser/safe_search_api/safe_search_url_checker.h" | 19 #include "chrome/browser/safe_search_api/safe_search_url_checker.h" |
20 #include "chrome/browser/supervised_user/supervised_user_site_list.h" | 20 #include "chrome/browser/supervised_user/supervised_user_site_list.h" |
21 #include "chrome/browser/supervised_user/supervised_users.h" | 21 #include "chrome/browser/supervised_user/supervised_users.h" |
22 #include "components/supervised_user_error_page/supervised_user_error_page.h" | 22 #include "components/supervised_user_error_page/supervised_user_error_page.h" |
23 #include "third_party/re2/src/re2/re2.h" | 23 #include "third_party/re2/src/re2/re2.h" |
24 | 24 |
25 class GURL; | 25 class GURL; |
26 class SupervisedUserBlacklist; | 26 class SupervisedUserBlacklist; |
27 | 27 |
28 namespace base { | |
29 class TaskRunner; | |
30 } | |
31 | |
32 namespace net { | 28 namespace net { |
33 class URLRequestContextGetter; | 29 class URLRequestContextGetter; |
34 } | 30 } |
35 | 31 |
| 32 class GURL; |
| 33 |
36 // This class manages the filtering behavior for a given URL, i.e. it tells | 34 // This class manages the filtering behavior for a given URL, i.e. it tells |
37 // callers if a given URL should be allowed, blocked or warned about. It uses | 35 // callers if a given URL should be allowed, blocked or warned about. It uses |
38 // information from multiple sources: | 36 // information from multiple sources: |
39 // * A default setting (allow, block or warn). | 37 // * A default setting (allow, block or warn). |
40 // * The set of installed and enabled whitelists which contain URL patterns | 38 // * The set of installed and enabled whitelists which contain URL patterns |
41 // and hostname hashes that should be allowed. | 39 // and hostname hashes that should be allowed. |
42 // * User-specified manual overrides (allow or block) for either sites | 40 // * User-specified manual overrides (allow or block) for either sites |
43 // (hostnames) or exact URLs, which take precedence over the previous | 41 // (hostnames) or exact URLs, which take precedence over the previous |
44 // sources. | 42 // sources. |
45 // References to it can be passed around on different threads (the refcounting | 43 // References to it can be passed around on different threads (the refcounting |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 re2::RE2 amp_cache_path_regex_; | 217 re2::RE2 amp_cache_path_regex_; |
220 re2::RE2 google_amp_viewer_path_regex_; | 218 re2::RE2 google_amp_viewer_path_regex_; |
221 re2::RE2 google_web_cache_query_regex_; | 219 re2::RE2 google_web_cache_query_regex_; |
222 | 220 |
223 scoped_refptr<base::TaskRunner> blocking_task_runner_; | 221 scoped_refptr<base::TaskRunner> blocking_task_runner_; |
224 | 222 |
225 DISALLOW_COPY_AND_ASSIGN(SupervisedUserURLFilter); | 223 DISALLOW_COPY_AND_ASSIGN(SupervisedUserURLFilter); |
226 }; | 224 }; |
227 | 225 |
228 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_URL_FILTER_H_ | 226 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_URL_FILTER_H_ |
OLD | NEW |