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

Side by Side Diff: net/test/url_request/url_request_failed_job.cc

Issue 1563633002: Make URLRequestJob::SetStatus private. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to comments Created 4 years, 11 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
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 #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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698