Chromium Code Reviews| 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 namespace policy { | |
| 19 class URLBlacklist; | |
|
Bernhard Bauer
2012/11/16 15:04:46
Is this necessary?
Sergiu
2012/11/26 14:48:08
Deleted.
| |
| 20 } | |
| 21 | |
| 18 class ManagedModeResourceThrottle : public content::ResourceThrottle { | 22 class ManagedModeResourceThrottle : public content::ResourceThrottle { |
| 19 public: | 23 public: |
| 20 ManagedModeResourceThrottle(const net::URLRequest* request, | 24 ManagedModeResourceThrottle(const net::URLRequest* request, |
| 21 int render_process_host_id, | 25 int render_process_host_id, |
| 22 int render_view_id, | 26 int render_view_id, |
| 23 bool is_main_frame); | 27 bool is_main_frame); |
| 24 virtual ~ManagedModeResourceThrottle(); | 28 virtual ~ManagedModeResourceThrottle(); |
| 25 | 29 |
| 26 // content::ResourceThrottle implementation: | 30 // content::ResourceThrottle implementation: |
| 27 virtual void WillStartRequest(bool* defer) OVERRIDE; | 31 virtual void WillStartRequest(bool* defer) OVERRIDE; |
| 28 | 32 |
| 29 private: | 33 private: |
| 30 void OnInterstitialResult(bool continue_request); | 34 void OnInterstitialResult(bool continue_request); |
| 31 | 35 |
| 32 base::WeakPtrFactory<ManagedModeResourceThrottle> weak_ptr_factory_; | 36 base::WeakPtrFactory<ManagedModeResourceThrottle> weak_ptr_factory_; |
| 33 const net::URLRequest* request_; | 37 const net::URLRequest* request_; |
| 34 int render_process_host_id_; | 38 int render_process_host_id_; |
| 35 int render_view_id_; | 39 int render_view_id_; |
| 36 bool is_main_frame_; | 40 bool is_main_frame_; |
| 37 const ManagedModeURLFilter* url_filter_; | 41 const ManagedModeURLFilter* url_filter_; |
| 38 | 42 |
| 39 DISALLOW_COPY_AND_ASSIGN(ManagedModeResourceThrottle); | 43 DISALLOW_COPY_AND_ASSIGN(ManagedModeResourceThrottle); |
| 40 }; | 44 }; |
| 41 | 45 |
| 42 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_RESOURCE_THROTTLE_H_ | 46 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_RESOURCE_THROTTLE_H_ |
| OLD | NEW |