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

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

Issue 10644011: Revert r143458 (which re-applies r143341 and r142979). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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) 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 int child_id, 115 int child_id,
116 int route_id, 116 int route_id,
117 ResourceContext* context); 117 ResourceContext* context);
118 118
119 // Cancels the given request if it still exists. We ignore cancels from the 119 // Cancels the given request if it still exists. We ignore cancels from the
120 // renderer in the event of a download. 120 // renderer in the event of a download.
121 void CancelRequest(int child_id, 121 void CancelRequest(int child_id,
122 int request_id, 122 int request_id,
123 bool from_renderer); 123 bool from_renderer);
124 124
125 // Returns true if it's ok to send the data. If there are already too many
126 // data messages pending, it pauses the request and returns false. In this
127 // case the caller should not send the data.
128 bool WillSendData(int child_id, int request_id, bool* defer);
129
130 // Marks the request as "parked". This happens if a request is 125 // Marks the request as "parked". This happens if a request is
131 // redirected cross-site and needs to be resumed by a new render view. 126 // redirected cross-site and needs to be resumed by a new render view.
132 void MarkAsTransferredNavigation(const GlobalRequestID& id); 127 void MarkAsTransferredNavigation(const GlobalRequestID& id);
133 128
134 // Returns the number of pending requests. This is designed for the unittests 129 // Returns the number of pending requests. This is designed for the unittests
135 int pending_requests() const { 130 int pending_requests() const {
136 return static_cast<int>(pending_loaders_.size()); 131 return static_cast<int>(pending_loaders_.size());
137 } 132 }
138 133
139 // Intended for unit-tests only. Returns the memory cost of all the 134 // Intended for unit-tests only. Returns the memory cost of all the
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 // started) until ResumeBlockedRequestsForRoute or 181 // started) until ResumeBlockedRequestsForRoute or
187 // CancelBlockedRequestsForRoute is called. 182 // CancelBlockedRequestsForRoute is called.
188 void BlockRequestsForRoute(int child_id, int route_id); 183 void BlockRequestsForRoute(int child_id, int route_id);
189 184
190 // Resumes any blocked request for the specified route id. 185 // Resumes any blocked request for the specified route id.
191 void ResumeBlockedRequestsForRoute(int child_id, int route_id); 186 void ResumeBlockedRequestsForRoute(int child_id, int route_id);
192 187
193 // Cancels any blocked request for the specified route id. 188 // Cancels any blocked request for the specified route id.
194 void CancelBlockedRequestsForRoute(int child_id, int route_id); 189 void CancelBlockedRequestsForRoute(int child_id, int route_id);
195 190
196 // Decrements the pending_data_count for the request and resumes
197 // the request if it was paused due to too many pending data
198 // messages sent.
199 void DataReceivedACK(int child_id, int request_id);
200
201 // Maintains a collection of temp files created in support of 191 // Maintains a collection of temp files created in support of
202 // the download_to_file capability. Used to grant access to the 192 // the download_to_file capability. Used to grant access to the
203 // child process and to defer deletion of the file until it's 193 // child process and to defer deletion of the file until it's
204 // no longer needed. 194 // no longer needed.
205 void RegisterDownloadedTempFile( 195 void RegisterDownloadedTempFile(
206 int child_id, int request_id, 196 int child_id, int request_id,
207 webkit_blob::ShareableFileReference* reference); 197 webkit_blob::ShareableFileReference* reference);
208 void UnregisterDownloadedTempFile(int child_id, int request_id); 198 void UnregisterDownloadedTempFile(int child_id, int request_id);
209 199
210 // Needed for the sync IPC message dispatcher macros. 200 // Needed for the sync IPC message dispatcher macros.
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 // http://crbug.com/90971 - Assists in tracking down use-after-frees on 418 // http://crbug.com/90971 - Assists in tracking down use-after-frees on
429 // shutdown. 419 // shutdown.
430 std::set<const ResourceContext*> active_resource_contexts_; 420 std::set<const ResourceContext*> active_resource_contexts_;
431 421
432 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); 422 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl);
433 }; 423 };
434 424
435 } // namespace content 425 } // namespace content
436 426
437 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_IMPL_H_ 427 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698