Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: content/browser/renderer_host/resource_dispatcher_host.h

Issue 6713008: Don't destroy a request while it is being processed (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebased. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 // no errors have occurred). 310 // no errors have occurred).
311 bool CompleteRead(net::URLRequest*, int* bytes_read); 311 bool CompleteRead(net::URLRequest*, int* bytes_read);
312 312
313 // Internal function to finish handling the ResponseStarted message. Returns 313 // Internal function to finish handling the ResponseStarted message. Returns
314 // true on success. 314 // true on success.
315 bool CompleteResponseStarted(net::URLRequest* request); 315 bool CompleteResponseStarted(net::URLRequest* request);
316 316
317 // Helper function for regular and download requests. 317 // Helper function for regular and download requests.
318 void BeginRequestInternal(net::URLRequest* request); 318 void BeginRequestInternal(net::URLRequest* request);
319 319
320 // Helper function that cancels |request|. 320 // Helper function that cancels |request|. Returns whether the
321 void CancelRequestInternal(net::URLRequest* request, bool from_renderer); 321 // request was actually cancelled. If a renderer cancels a request
322 // for a download, we ignore the cancellation.
323 bool CancelRequestInternal(net::URLRequest* request, bool from_renderer);
322 324
323 // Helper function that inserts |request| into the resource queue. 325 // Helper function that inserts |request| into the resource queue.
324 void InsertIntoResourceQueue( 326 void InsertIntoResourceQueue(
325 net::URLRequest* request, 327 net::URLRequest* request,
326 const ResourceDispatcherHostRequestInfo& request_info); 328 const ResourceDispatcherHostRequestInfo& request_info);
327 329
328 // Updates the "cost" of outstanding requests for |process_unique_id|. 330 // Updates the "cost" of outstanding requests for |process_unique_id|.
329 // The "cost" approximates how many bytes are consumed by all the in-memory 331 // The "cost" approximates how many bytes are consumed by all the in-memory
330 // data structures supporting this request (net::URLRequest object, 332 // data structures supporting this request (net::URLRequest object,
331 // HttpNetworkTransaction, etc...). 333 // HttpNetworkTransaction, etc...).
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 506
505 static bool is_prefetch_enabled_; 507 static bool is_prefetch_enabled_;
506 typedef std::set<std::pair<int, int> > PrerenderChildRouteIdPairs; 508 typedef std::set<std::pair<int, int> > PrerenderChildRouteIdPairs;
507 PrerenderChildRouteIdPairs prerender_child_route_pairs_; 509 PrerenderChildRouteIdPairs prerender_child_route_pairs_;
508 510
509 511
510 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); 512 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost);
511 }; 513 };
512 514
513 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ 515 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698