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

Side by Side Diff: chrome/browser/automation/url_request_automation_job.cc

Issue 269064: Set os_error to net::ERR_ABORTED instead of 0 or net::ERR_FAILED when... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/resource_dispatcher_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include "chrome/browser/automation/url_request_automation_job.h" 5 #include "chrome/browser/automation/url_request_automation_job.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "chrome/browser/automation/automation_resource_message_filter.h" 9 #include "chrome/browser/automation/automation_resource_message_filter.h"
10 #include "chrome/browser/renderer_host/render_view_host.h" 10 #include "chrome/browser/renderer_host/render_view_host.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 void URLRequestAutomationJob::Start() { 116 void URLRequestAutomationJob::Start() {
117 // Start reading asynchronously so that all error reporting and data 117 // Start reading asynchronously so that all error reporting and data
118 // callbacks happen as they would for network requests. 118 // callbacks happen as they would for network requests.
119 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( 119 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
120 this, &URLRequestAutomationJob::StartAsync)); 120 this, &URLRequestAutomationJob::StartAsync));
121 } 121 }
122 122
123 void URLRequestAutomationJob::Kill() { 123 void URLRequestAutomationJob::Kill() {
124 if (message_filter_.get()) { 124 if (message_filter_.get()) {
125 message_filter_->Send(new AutomationMsg_RequestEnd(0, tab_, id_, 125 message_filter_->Send(new AutomationMsg_RequestEnd(0, tab_, id_,
126 URLRequestStatus(URLRequestStatus::CANCELED, 0))); 126 URLRequestStatus(URLRequestStatus::CANCELED, net::ERR_ABORTED)));
127 } 127 }
128 DisconnectFromMessageFilter(); 128 DisconnectFromMessageFilter();
129 URLRequestJob::Kill(); 129 URLRequestJob::Kill();
130 } 130 }
131 131
132 bool URLRequestAutomationJob::ReadRawData( 132 bool URLRequestAutomationJob::ReadRawData(
133 net::IOBuffer* buf, int buf_size, int* bytes_read) { 133 net::IOBuffer* buf, int buf_size, int* bytes_read) {
134 DLOG(INFO) << "URLRequestAutomationJob: " << 134 DLOG(INFO) << "URLRequestAutomationJob: " <<
135 request_->url().spec() << " - read pending: " << buf_size; 135 request_->url().spec() << " - read pending: " << buf_size;
136 pending_buf_ = buf; 136 pending_buf_ = buf;
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 message_filter_->Send(new AutomationMsg_RequestStart(0, tab_, id_, 408 message_filter_->Send(new AutomationMsg_RequestStart(0, tab_, id_,
409 automation_request)); 409 automation_request));
410 } 410 }
411 411
412 void URLRequestAutomationJob::DisconnectFromMessageFilter() { 412 void URLRequestAutomationJob::DisconnectFromMessageFilter() {
413 if (message_filter_) { 413 if (message_filter_) {
414 message_filter_->UnRegisterRequest(this); 414 message_filter_->UnRegisterRequest(this);
415 message_filter_ = NULL; 415 message_filter_ = NULL;
416 } 416 }
417 } 417 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/resource_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698