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/http/http_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 157 |
158 if (request_->load_flags & LOAD_DISABLE_CERT_REVOCATION_CHECKING) { | 158 if (request_->load_flags & LOAD_DISABLE_CERT_REVOCATION_CHECKING) { |
159 server_ssl_config_.rev_checking_enabled = false; | 159 server_ssl_config_.rev_checking_enabled = false; |
160 proxy_ssl_config_.rev_checking_enabled = false; | 160 proxy_ssl_config_.rev_checking_enabled = false; |
161 } | 161 } |
162 | 162 |
163 next_state_ = STATE_CREATE_STREAM; | 163 next_state_ = STATE_CREATE_STREAM; |
164 int rv = DoLoop(OK); | 164 int rv = DoLoop(OK); |
165 if (rv == ERR_IO_PENDING) | 165 if (rv == ERR_IO_PENDING) |
166 callback_ = callback; | 166 callback_ = callback; |
167 CHECK_NE(rv, ERR_SPDY_PING_FAILED); | |
168 return rv; | 167 return rv; |
169 } | 168 } |
170 | 169 |
171 int HttpNetworkTransaction::RestartIgnoringLastError( | 170 int HttpNetworkTransaction::RestartIgnoringLastError( |
172 const CompletionCallback& callback) { | 171 const CompletionCallback& callback) { |
173 DCHECK(!stream_.get()); | 172 DCHECK(!stream_.get()); |
174 DCHECK(!stream_request_.get()); | 173 DCHECK(!stream_request_.get()); |
175 DCHECK_EQ(STATE_NONE, next_state_); | 174 DCHECK_EQ(STATE_NONE, next_state_); |
176 | 175 |
177 next_state_ = STATE_CREATE_STREAM; | 176 next_state_ = STATE_CREATE_STREAM; |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 stream_.reset(stream); | 463 stream_.reset(stream); |
465 stream_request_.reset(); // we're done with the stream request | 464 stream_request_.reset(); // we're done with the stream request |
466 OnIOComplete(ERR_HTTPS_PROXY_TUNNEL_RESPONSE); | 465 OnIOComplete(ERR_HTTPS_PROXY_TUNNEL_RESPONSE); |
467 } | 466 } |
468 | 467 |
469 bool HttpNetworkTransaction::is_https_request() const { | 468 bool HttpNetworkTransaction::is_https_request() const { |
470 return request_->url.SchemeIs("https"); | 469 return request_->url.SchemeIs("https"); |
471 } | 470 } |
472 | 471 |
473 void HttpNetworkTransaction::DoCallback(int rv) { | 472 void HttpNetworkTransaction::DoCallback(int rv) { |
474 CHECK_NE(rv, ERR_SPDY_PING_FAILED); | |
475 DCHECK_NE(rv, ERR_IO_PENDING); | 473 DCHECK_NE(rv, ERR_IO_PENDING); |
476 DCHECK(!callback_.is_null()); | 474 DCHECK(!callback_.is_null()); |
477 | 475 |
478 // Since Run may result in Read being called, clear user_callback_ up front. | 476 // Since Run may result in Read being called, clear user_callback_ up front. |
479 CompletionCallback c = callback_; | 477 CompletionCallback c = callback_; |
480 callback_.Reset(); | 478 callback_.Reset(); |
481 c.Run(rv); | 479 c.Run(rv); |
482 } | 480 } |
483 | 481 |
484 void HttpNetworkTransaction::OnIOComplete(int result) { | 482 void HttpNetworkTransaction::OnIOComplete(int result) { |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1375 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, | 1373 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, |
1376 state); | 1374 state); |
1377 break; | 1375 break; |
1378 } | 1376 } |
1379 return description; | 1377 return description; |
1380 } | 1378 } |
1381 | 1379 |
1382 #undef STATE_CASE | 1380 #undef STATE_CASE |
1383 | 1381 |
1384 } // namespace net | 1382 } // namespace net |
OLD | NEW |