OLD | NEW |
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 #include "net/test/url_request/url_request_failed_job.h" | 5 #include "net/test/url_request/url_request_failed_job.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 174 |
175 URLRequestFailedJob::~URLRequestFailedJob() { | 175 URLRequestFailedJob::~URLRequestFailedJob() { |
176 } | 176 } |
177 | 177 |
178 void URLRequestFailedJob::StartAsync() { | 178 void URLRequestFailedJob::StartAsync() { |
179 if (phase_ == START) { | 179 if (phase_ == START) { |
180 if (net_error_ != ERR_IO_PENDING) { | 180 if (net_error_ != ERR_IO_PENDING) { |
181 NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, net_error_)); | 181 NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, net_error_)); |
182 return; | 182 return; |
183 } | 183 } |
184 SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0)); | |
185 return; | 184 return; |
186 } | 185 } |
187 response_info_.headers = new net::HttpResponseHeaders("HTTP/1.1 200 OK"); | 186 response_info_.headers = new net::HttpResponseHeaders("HTTP/1.1 200 OK"); |
188 NotifyHeadersComplete(); | 187 NotifyHeadersComplete(); |
189 } | 188 } |
190 | 189 |
191 } // namespace net | 190 } // namespace net |
OLD | NEW |