| 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/quic/chromium/quic_http_stream.h" | 5 #include "net/quic/chromium/quic_http_stream.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 if (!stream) { | 121 if (!stream) { |
| 122 // rendezvous has failed so proceed as with a non-push request. | 122 // rendezvous has failed so proceed as with a non-push request. |
| 123 next_state_ = STATE_REQUEST_STREAM; | 123 next_state_ = STATE_REQUEST_STREAM; |
| 124 } | 124 } |
| 125 | 125 |
| 126 OnIOComplete(OK); | 126 OnIOComplete(OK); |
| 127 } | 127 } |
| 128 | 128 |
| 129 int QuicHttpStream::InitializeStream(const HttpRequestInfo* request_info, | 129 int QuicHttpStream::InitializeStream(const HttpRequestInfo* request_info, |
| 130 RequestPriority priority, | 130 RequestPriority priority, |
| 131 const BoundNetLog& stream_net_log, | 131 const NetLogWithSource& stream_net_log, |
| 132 const CompletionCallback& callback) { | 132 const CompletionCallback& callback) { |
| 133 CHECK(callback_.is_null()); | 133 CHECK(callback_.is_null()); |
| 134 DCHECK(!stream_); | 134 DCHECK(!stream_); |
| 135 if (!session_) | 135 if (!session_) |
| 136 return was_handshake_confirmed_ ? ERR_CONNECTION_CLOSED | 136 return was_handshake_confirmed_ ? ERR_CONNECTION_CLOSED |
| 137 : ERR_QUIC_HANDSHAKE_FAILED; | 137 : ERR_QUIC_HANDSHAKE_FAILED; |
| 138 | 138 |
| 139 stream_net_log.AddEvent( | 139 stream_net_log.AddEvent( |
| 140 NetLogEventType::HTTP_STREAM_REQUEST_BOUND_TO_QUIC_SESSION, | 140 NetLogEventType::HTTP_STREAM_REQUEST_BOUND_TO_QUIC_SESSION, |
| 141 session_->net_log().source().ToEventParametersCallback()); | 141 session_->net_log().source().ToEventParametersCallback()); |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 closed_is_first_stream_ = stream_->IsFirstStream(); | 823 closed_is_first_stream_ = stream_->IsFirstStream(); |
| 824 stream_ = nullptr; | 824 stream_ = nullptr; |
| 825 | 825 |
| 826 // If |request_body_stream_| is non-NULL, Reset it, to abort any in progress | 826 // If |request_body_stream_| is non-NULL, Reset it, to abort any in progress |
| 827 // read. | 827 // read. |
| 828 if (request_body_stream_) | 828 if (request_body_stream_) |
| 829 request_body_stream_->Reset(); | 829 request_body_stream_->Reset(); |
| 830 } | 830 } |
| 831 | 831 |
| 832 } // namespace net | 832 } // namespace net |
| OLD | NEW |