| 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/quic_http_stream.h" | 5 #include "net/quic/quic_http_stream.h" |
| 6 | 6 |
| 7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
| 8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 bool secure_session = | 113 bool secure_session = |
| 114 session_->GetSSLInfo(&ssl_info) && ssl_info.cert.get(); | 114 session_->GetSSLInfo(&ssl_info) && ssl_info.cert.get(); |
| 115 DCHECK(secure_session); | 115 DCHECK(secure_session); |
| 116 UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.CookieSentToAccountsOverChannelId", | 116 UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.CookieSentToAccountsOverChannelId", |
| 117 ssl_info.channel_id_sent); | 117 ssl_info.channel_id_sent); |
| 118 } | 118 } |
| 119 if (!stream_) { | 119 if (!stream_) { |
| 120 return ERR_CONNECTION_CLOSED; | 120 return ERR_CONNECTION_CLOSED; |
| 121 } | 121 } |
| 122 | 122 |
| 123 QuicPriority priority = ConvertRequestPriorityToQuicPriority(priority_); | 123 SpdyPriority priority = ConvertRequestPriorityToQuicPriority(priority_); |
| 124 stream_->set_priority(priority); | 124 stream_->set_priority(priority); |
| 125 // Store the serialized request headers. | 125 // Store the serialized request headers. |
| 126 CreateSpdyHeadersFromHttpRequest(*request_info_, request_headers, HTTP2, | 126 CreateSpdyHeadersFromHttpRequest(*request_info_, request_headers, HTTP2, |
| 127 /*direct=*/true, &request_headers_); | 127 /*direct=*/true, &request_headers_); |
| 128 | 128 |
| 129 // Store the request body. | 129 // Store the request body. |
| 130 request_body_stream_ = request_info_->upload_data_stream; | 130 request_body_stream_ = request_info_->upload_data_stream; |
| 131 if (request_body_stream_) { | 131 if (request_body_stream_) { |
| 132 // TODO(rch): Can we be more precise about when to allocate | 132 // TODO(rch): Can we be more precise about when to allocate |
| 133 // raw_request_body_buf_. Removed the following check. DoReadRequestBody() | 133 // raw_request_body_buf_. Removed the following check. DoReadRequestBody() |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 closed_stream_sent_bytes_ = stream_->stream_bytes_written(); | 548 closed_stream_sent_bytes_ = stream_->stream_bytes_written(); |
| 549 stream_ = nullptr; | 549 stream_ = nullptr; |
| 550 | 550 |
| 551 // If |request_body_stream_| is non-NULL, Reset it, to abort any in progress | 551 // If |request_body_stream_| is non-NULL, Reset it, to abort any in progress |
| 552 // read. | 552 // read. |
| 553 if (request_body_stream_) | 553 if (request_body_stream_) |
| 554 request_body_stream_->Reset(); | 554 request_body_stream_->Reset(); |
| 555 } | 555 } |
| 556 | 556 |
| 557 } // namespace net | 557 } // namespace net |
| OLD | NEW |