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 |
(...skipping 25 matching lines...) Expand all Loading... |
36 explicit ChromeResourceDispatcherHostDelegate( | 36 explicit ChromeResourceDispatcherHostDelegate( |
37 prerender::PrerenderTracker* prerender_tracker); | 37 prerender::PrerenderTracker* prerender_tracker); |
38 virtual ~ChromeResourceDispatcherHostDelegate(); | 38 virtual ~ChromeResourceDispatcherHostDelegate(); |
39 | 39 |
40 // ResourceDispatcherHostDelegate implementation. | 40 // ResourceDispatcherHostDelegate implementation. |
41 virtual bool ShouldBeginRequest( | 41 virtual bool ShouldBeginRequest( |
42 int child_id, | 42 int child_id, |
43 int route_id, | 43 int route_id, |
44 const std::string& method, | 44 const std::string& method, |
45 const GURL& url, | 45 const GURL& url, |
46 ResourceType::Type resource_type, | 46 content::ResourceType::Type resource_type, |
47 content::ResourceContext* resource_context) OVERRIDE; | 47 content::ResourceContext* resource_context) OVERRIDE; |
48 virtual void RequestBeginning( | 48 virtual void RequestBeginning( |
49 net::URLRequest* request, | 49 net::URLRequest* request, |
50 content::ResourceContext* resource_context, | 50 content::ResourceContext* resource_context, |
51 content::AppCacheService* appcache_service, | 51 content::AppCacheService* appcache_service, |
52 ResourceType::Type resource_type, | 52 content::ResourceType::Type resource_type, |
53 int child_id, | 53 int child_id, |
54 int route_id, | 54 int route_id, |
55 ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE; | 55 ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE; |
56 virtual void DownloadStarting( | 56 virtual void DownloadStarting( |
57 net::URLRequest* request, | 57 net::URLRequest* request, |
58 content::ResourceContext* resource_context, | 58 content::ResourceContext* resource_context, |
59 int child_id, | 59 int child_id, |
60 int route_id, | 60 int route_id, |
61 int request_id, | 61 int request_id, |
62 bool is_content_initiated, | 62 bool is_content_initiated, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 private: | 98 private: |
99 struct StreamTargetInfo { | 99 struct StreamTargetInfo { |
100 std::string extension_id; | 100 std::string extension_id; |
101 std::string view_id; | 101 std::string view_id; |
102 }; | 102 }; |
103 | 103 |
104 void AppendStandardResourceThrottles( | 104 void AppendStandardResourceThrottles( |
105 net::URLRequest* request, | 105 net::URLRequest* request, |
106 content::ResourceContext* resource_context, | 106 content::ResourceContext* resource_context, |
107 ResourceType::Type resource_type, | 107 content::ResourceType::Type resource_type, |
108 ScopedVector<content::ResourceThrottle>* throttles); | 108 ScopedVector<content::ResourceThrottle>* throttles); |
109 | 109 |
110 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 110 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
111 // Append headers required to tell Gaia whether the sync interstitial | 111 // Append headers required to tell Gaia whether the sync interstitial |
112 // should be shown or not. This header is only added for valid Gaia URLs. | 112 // should be shown or not. This header is only added for valid Gaia URLs. |
113 void AppendChromeSyncGaiaHeader( | 113 void AppendChromeSyncGaiaHeader( |
114 net::URLRequest* request, | 114 net::URLRequest* request, |
115 content::ResourceContext* resource_context); | 115 content::ResourceContext* resource_context); |
116 #endif | 116 #endif |
117 | 117 |
118 scoped_refptr<DownloadRequestLimiter> download_request_limiter_; | 118 scoped_refptr<DownloadRequestLimiter> download_request_limiter_; |
119 scoped_refptr<SafeBrowsingService> safe_browsing_; | 119 scoped_refptr<SafeBrowsingService> safe_browsing_; |
120 scoped_refptr<extensions::UserScriptListener> user_script_listener_; | 120 scoped_refptr<extensions::UserScriptListener> user_script_listener_; |
121 prerender::PrerenderTracker* prerender_tracker_; | 121 prerender::PrerenderTracker* prerender_tracker_; |
122 std::map<net::URLRequest*, StreamTargetInfo> stream_target_info_; | 122 std::map<net::URLRequest*, StreamTargetInfo> stream_target_info_; |
123 | 123 |
124 DISALLOW_COPY_AND_ASSIGN(ChromeResourceDispatcherHostDelegate); | 124 DISALLOW_COPY_AND_ASSIGN(ChromeResourceDispatcherHostDelegate); |
125 }; | 125 }; |
126 | 126 |
127 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE
_H_ | 127 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE
_H_ |
OLD | NEW |