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

Unified Diff: content/browser/renderer_host/resource_dispatcher_host_impl.h

Issue 10332130: Use defer out-params instead of ResourceDispatcherHostImpl::PauseRequest(...true) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/resource_dispatcher_host_impl.h
===================================================================
--- content/browser/renderer_host/resource_dispatcher_host_impl.h (revision 137742)
+++ content/browser/renderer_host/resource_dispatcher_host_impl.h (working copy)
@@ -136,14 +136,14 @@
// Starts a request that was deferred during ResourceHandler::OnWillStart().
void StartDeferredRequest(int child_id, int request_id);
+ // Resumes network activity for a particular request.
+ void ResumeDeferredRequest(int child_id, int request_id);
+
// Returns true if it's ok to send the data. If there are already too many
// data messages pending, it pauses the request and returns false. In this
// case the caller should not send the data.
bool WillSendData(int child_id, int request_id);
- // Pauses or resumes network activity for a particular request.
- void PauseRequest(int child_id, int request_id, bool pause);
-
// Returns the number of pending requests. This is designed for the unittests
int pending_requests() const {
return static_cast<int>(pending_requests_.size());
@@ -264,6 +264,7 @@
const DownloadResourceHandler::OnStartedCallback& started_cb);
private:
+ friend class ResourceDispatcherHostTest;
FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
TestBlockedRequestsProcessDies);
FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
@@ -291,6 +292,9 @@
// Returns true if the request is paused.
bool PauseRequestIfNeeded(ResourceRequestInfoImpl* info);
+ // Pause or resume network activity for a particular request.
+ void PauseRequest(int child_id, int request_id, bool pause);
+
// Resumes the given request by calling OnResponseStarted or OnReadCompleted.
void ResumeRequest(const GlobalRequestID& request_id);

Powered by Google App Engine
This is Rietveld 408576698