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 // This is the browser side of the resource dispatcher, it receives requests | 5 // This is the browser side of the resource dispatcher, it receives requests |
6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and | 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and |
7 // dispatches them to URLRequests. It then forwards the messages from the | 7 // dispatches them to URLRequests. It then forwards the messages from the |
8 // URLRequests back to the correct process for handling. | 8 // URLRequests back to the correct process for handling. |
9 // | 9 // |
10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 228 |
229 // Must be called after the ResourceRequestInfo has been created | 229 // Must be called after the ResourceRequestInfo has been created |
230 // and associated with the request. If |payload| is set to a non-empty value, | 230 // and associated with the request. If |payload| is set to a non-empty value, |
231 // the value will be sent to the old resource handler instead of canceling | 231 // the value will be sent to the old resource handler instead of canceling |
232 // it, except on HTTP errors. | 232 // it, except on HTTP errors. |
233 scoped_ptr<ResourceHandler> MaybeInterceptAsStream( | 233 scoped_ptr<ResourceHandler> MaybeInterceptAsStream( |
234 net::URLRequest* request, | 234 net::URLRequest* request, |
235 ResourceResponse* response, | 235 ResourceResponse* response, |
236 std::string* payload); | 236 std::string* payload); |
237 | 237 |
238 void ClearSSLClientAuthHandlerForRequest(net::URLRequest* request); | |
239 | |
240 ResourceScheduler* scheduler() { return scheduler_.get(); } | 238 ResourceScheduler* scheduler() { return scheduler_.get(); } |
241 | 239 |
242 // Called by a ResourceHandler when it's ready to start reading data and | 240 // Called by a ResourceHandler when it's ready to start reading data and |
243 // sending it to the renderer. Returns true if there are enough file | 241 // sending it to the renderer. Returns true if there are enough file |
244 // descriptors available for the shared memory buffer. If false is returned, | 242 // descriptors available for the shared memory buffer. If false is returned, |
245 // the request should cancel. | 243 // the request should cancel. |
246 bool HasSufficientResourcesForRequest(const net::URLRequest* request_); | 244 bool HasSufficientResourcesForRequest(const net::URLRequest* request_); |
247 | 245 |
248 // Called by a ResourceHandler after it has finished its request and is done | 246 // Called by a ResourceHandler after it has finished its request and is done |
249 // using its shared memory buffer. Frees up that file descriptor to be used | 247 // using its shared memory buffer. Frees up that file descriptor to be used |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 DelegateMap delegate_map_; | 536 DelegateMap delegate_map_; |
539 | 537 |
540 scoped_ptr<ResourceScheduler> scheduler_; | 538 scoped_ptr<ResourceScheduler> scheduler_; |
541 | 539 |
542 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 540 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
543 }; | 541 }; |
544 | 542 |
545 } // namespace content | 543 } // namespace content |
546 | 544 |
547 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 545 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
OLD | NEW |