OLD | NEW |
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 CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_RESOURCE_THROTTLE_H_ | 5 #ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_RESOURCE_THROTTLE_H_ |
6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_RESOURCE_THROTTLE_H_ | 6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_RESOURCE_THROTTLE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "content/public/browser/resource_throttle.h" | 10 #include "content/public/browser/resource_throttle.h" |
11 | 11 |
12 class ManagedModeURLFilter; | 12 class ManagedModeURLFilter; |
13 | 13 |
14 namespace net { | 14 namespace net { |
15 class URLRequest; | 15 class URLRequest; |
16 } | 16 } |
17 | 17 |
18 class ManagedModeResourceThrottle : public content::ResourceThrottle { | 18 class ManagedModeResourceThrottle : public content::ResourceThrottle { |
19 public: | 19 public: |
20 ManagedModeResourceThrottle(const net::URLRequest* request, | 20 ManagedModeResourceThrottle(const net::URLRequest* request, |
21 int render_process_host_id, | 21 int render_process_host_id, |
22 int render_view_id, | 22 int render_view_id, |
23 bool is_main_frame); | 23 bool is_main_frame, |
| 24 const ManagedModeURLFilter* url_filter); |
24 virtual ~ManagedModeResourceThrottle(); | 25 virtual ~ManagedModeResourceThrottle(); |
25 | 26 |
26 // Adds/removes a temporary exception to filtering for a | 27 // Adds/removes a temporary exception to filtering for a |
27 // render_process_host_id and render_view_id pair (which identify a tab) | 28 // render_process_host_id and render_view_id pair (which identify a tab) |
28 // to the preview map. Adding saves the last approved hostname in the map, | 29 // to the preview map. Adding saves the last approved hostname in the map, |
29 // which is then used to allow the user to browse on that hostname without | 30 // which is then used to allow the user to browse on that hostname without |
30 // getting an interstitial. See managed_mode_resource_throttle.cc for more | 31 // getting an interstitial. See managed_mode_resource_throttle.cc for more |
31 // details on the preview map. | 32 // details on the preview map. |
32 static void AddTemporaryException(int render_process_host_id, | 33 static void AddTemporaryException(int render_process_host_id, |
33 int render_view_id, | 34 int render_view_id, |
(...skipping 17 matching lines...) Expand all Loading... |
51 int render_process_host_id_; | 52 int render_process_host_id_; |
52 int render_view_id_; | 53 int render_view_id_; |
53 bool is_main_frame_; | 54 bool is_main_frame_; |
54 bool temporarily_allowed_; | 55 bool temporarily_allowed_; |
55 const ManagedModeURLFilter* url_filter_; | 56 const ManagedModeURLFilter* url_filter_; |
56 | 57 |
57 DISALLOW_COPY_AND_ASSIGN(ManagedModeResourceThrottle); | 58 DISALLOW_COPY_AND_ASSIGN(ManagedModeResourceThrottle); |
58 }; | 59 }; |
59 | 60 |
60 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_RESOURCE_THROTTLE_H_ | 61 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_RESOURCE_THROTTLE_H_ |
OLD | NEW |