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

Unified Diff: content/browser/renderer_host/resource_dispatcher_host.cc

Issue 6881106: Treat ERR_CONNECTION_CLOSED as end-of-data marker for downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with trunk Created 9 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.cc
diff --git a/content/browser/renderer_host/resource_dispatcher_host.cc b/content/browser/renderer_host/resource_dispatcher_host.cc
index c92d1d6aebfaa168f3ea48a65728058bd74c6cff..0de50c5e8d039425917c03ff2466e590a2804664 100644
--- a/content/browser/renderer_host/resource_dispatcher_host.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host.cc
@@ -1474,7 +1474,10 @@ void ResourceDispatcherHost::ResumeRequest(const GlobalRequestID& request_id) {
if (!info->is_paused())
return;
- VLOG(1) << "Resuming: " << i->second->url().spec();
+ VLOG(1) << "Resuming: \"" << i->second->url().spec() << "\""
+ << " paused_read_bytes = " << info->paused_read_bytes()
+ << " called response started = " << info->called_on_response_started()
+ << " started reading = " << info->has_started_reading();
info->set_is_paused(false);
@@ -1522,7 +1525,8 @@ bool ResourceDispatcherHost::Read(net::URLRequest* request, int* bytes_read) {
void ResourceDispatcherHost::OnReadCompleted(net::URLRequest* request,
int bytes_read) {
DCHECK(request);
- VLOG(1) << "OnReadCompleted: " << request->url().spec();
+ VLOG(1) << "OnReadCompleted: \"" << request->url().spec() << "\""
+ << " bytes_read = " << bytes_read;
ResourceDispatcherHostRequestInfo* info = InfoForRequest(request);
// bytes_read == -1 always implies an error, so we want to skip the
@@ -1540,7 +1544,8 @@ void ResourceDispatcherHost::OnReadCompleted(net::URLRequest* request,
if (PauseRequestIfNeeded(info)) {
info->set_paused_read_bytes(bytes_read);
- VLOG(1) << "OnReadCompleted pausing: " << request->url().spec();
+ VLOG(1) << "OnReadCompleted pausing: \"" << request->url().spec() << "\""
+ << " bytes_read = " << bytes_read;
return;
}
@@ -1556,6 +1561,9 @@ void ResourceDispatcherHost::OnReadCompleted(net::URLRequest* request,
// Force the next CompleteRead / Read pair to run as a separate task.
// This avoids a fast, large network request from monopolizing the IO
// thread and starving other IO operations from running.
+ VLOG(1) << "OnReadCompleted postponing: \""
+ << request->url().spec() << "\""
+ << " bytes_read = " << bytes_read;
info->set_paused_read_bytes(bytes_read);
info->set_is_paused(true);
GlobalRequestID id(info->child_id(), info->request_id());
@@ -1570,8 +1578,9 @@ void ResourceDispatcherHost::OnReadCompleted(net::URLRequest* request,
if (PauseRequestIfNeeded(info)) {
info->set_paused_read_bytes(bytes_read);
- VLOG(1) << "OnReadCompleted (CompleteRead) pausing: "
- << request->url().spec();
+ VLOG(1) << "OnReadCompleted (CompleteRead) pausing: \""
+ << request->url().spec() << "\""
+ << " bytes_read = " << bytes_read;
return;
}

Powered by Google App Engine
This is Rietveld 408576698