| 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 |
| 238 ResourceScheduler* scheduler() { return scheduler_.get(); } | 240 ResourceScheduler* scheduler() { return scheduler_.get(); } |
| 239 | 241 |
| 240 // Called by a ResourceHandler when it's ready to start reading data and | 242 // Called by a ResourceHandler when it's ready to start reading data and |
| 241 // sending it to the renderer. Returns true if there are enough file | 243 // sending it to the renderer. Returns true if there are enough file |
| 242 // descriptors available for the shared memory buffer. If false is returned, | 244 // descriptors available for the shared memory buffer. If false is returned, |
| 243 // the request should cancel. | 245 // the request should cancel. |
| 244 bool HasSufficientResourcesForRequest(const net::URLRequest* request_); | 246 bool HasSufficientResourcesForRequest(const net::URLRequest* request_); |
| 245 | 247 |
| 246 // Called by a ResourceHandler after it has finished its request and is done | 248 // Called by a ResourceHandler after it has finished its request and is done |
| 247 // using its shared memory buffer. Frees up that file descriptor to be used | 249 // 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... |
| 536 DelegateMap delegate_map_; | 538 DelegateMap delegate_map_; |
| 537 | 539 |
| 538 scoped_ptr<ResourceScheduler> scheduler_; | 540 scoped_ptr<ResourceScheduler> scheduler_; |
| 539 | 541 |
| 540 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 542 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 541 }; | 543 }; |
| 542 | 544 |
| 543 } // namespace content | 545 } // namespace content |
| 544 | 546 |
| 545 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 547 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |