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_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "chrome/browser/external_protocol/external_protocol_handler.h" | 13 #include "chrome/browser/external_protocol/external_protocol_handler.h" |
14 #include "content/public/browser/resource_dispatcher_host_delegate.h" | 14 #include "content/public/browser/resource_dispatcher_host_delegate.h" |
15 | 15 |
16 class DelayedResourceQueue; | 16 class DelayedResourceQueue; |
17 class DownloadRequestLimiter; | 17 class DownloadRequestLimiter; |
18 class SafeBrowsingService; | |
19 | 18 |
20 namespace extensions { | 19 namespace extensions { |
21 class UserScriptListener; | 20 class UserScriptListener; |
22 } | 21 } |
23 | 22 |
| 23 namespace safe_browsing { |
| 24 class SafeBrowsingService; |
| 25 } |
| 26 |
24 // Implements ResourceDispatcherHostDelegate. Currently used by the Prerender | 27 // Implements ResourceDispatcherHostDelegate. Currently used by the Prerender |
25 // system to abort requests and add to the load flags when a request begins. | 28 // system to abort requests and add to the load flags when a request begins. |
26 class ChromeResourceDispatcherHostDelegate | 29 class ChromeResourceDispatcherHostDelegate |
27 : public content::ResourceDispatcherHostDelegate { | 30 : public content::ResourceDispatcherHostDelegate { |
28 public: | 31 public: |
29 ChromeResourceDispatcherHostDelegate(); | 32 ChromeResourceDispatcherHostDelegate(); |
30 ~ChromeResourceDispatcherHostDelegate() override; | 33 ~ChromeResourceDispatcherHostDelegate() override; |
31 | 34 |
32 // ResourceDispatcherHostDelegate implementation. | 35 // ResourceDispatcherHostDelegate implementation. |
33 bool ShouldBeginRequest(const std::string& method, | 36 bool ShouldBeginRequest(const std::string& method, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 }; | 96 }; |
94 #endif | 97 #endif |
95 | 98 |
96 void AppendStandardResourceThrottles( | 99 void AppendStandardResourceThrottles( |
97 net::URLRequest* request, | 100 net::URLRequest* request, |
98 content::ResourceContext* resource_context, | 101 content::ResourceContext* resource_context, |
99 content::ResourceType resource_type, | 102 content::ResourceType resource_type, |
100 ScopedVector<content::ResourceThrottle>* throttles); | 103 ScopedVector<content::ResourceThrottle>* throttles); |
101 | 104 |
102 scoped_refptr<DownloadRequestLimiter> download_request_limiter_; | 105 scoped_refptr<DownloadRequestLimiter> download_request_limiter_; |
103 scoped_refptr<SafeBrowsingService> safe_browsing_; | 106 scoped_refptr<safe_browsing::SafeBrowsingService> safe_browsing_; |
104 #if defined(ENABLE_EXTENSIONS) | 107 #if defined(ENABLE_EXTENSIONS) |
105 scoped_refptr<extensions::UserScriptListener> user_script_listener_; | 108 scoped_refptr<extensions::UserScriptListener> user_script_listener_; |
106 std::map<net::URLRequest*, StreamTargetInfo> stream_target_info_; | 109 std::map<net::URLRequest*, StreamTargetInfo> stream_target_info_; |
107 #endif | 110 #endif |
108 | 111 |
109 DISALLOW_COPY_AND_ASSIGN(ChromeResourceDispatcherHostDelegate); | 112 DISALLOW_COPY_AND_ASSIGN(ChromeResourceDispatcherHostDelegate); |
110 }; | 113 }; |
111 | 114 |
112 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE
_H_ | 115 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE
_H_ |
OLD | NEW |