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

Side by Side Diff: net/spdy/spdy_http_stream.cc

Issue 2496953002: Revert of Unify enum NextProto and enum AlternateProtocol. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « net/spdy/spdy_http_stream.h ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/spdy/spdy_http_stream.h" 5 #include "net/spdy/spdy_http_stream.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 closed_stream_sent_bytes_(0), 43 closed_stream_sent_bytes_(0),
44 request_info_(NULL), 44 request_info_(NULL),
45 response_info_(NULL), 45 response_info_(NULL),
46 response_headers_status_(RESPONSE_HEADERS_ARE_INCOMPLETE), 46 response_headers_status_(RESPONSE_HEADERS_ARE_INCOMPLETE),
47 user_buffer_len_(0), 47 user_buffer_len_(0),
48 request_body_buf_size_(0), 48 request_body_buf_size_(0),
49 buffered_read_callback_pending_(false), 49 buffered_read_callback_pending_(false),
50 more_read_data_pending_(false), 50 more_read_data_pending_(false),
51 direct_(direct), 51 direct_(direct),
52 was_alpn_negotiated_(false), 52 was_alpn_negotiated_(false),
53 negotiated_protocol_(kProtoUnknown),
53 weak_factory_(this) { 54 weak_factory_(this) {
54 DCHECK(spdy_session_.get()); 55 DCHECK(spdy_session_.get());
55 } 56 }
56 57
57 SpdyHttpStream::~SpdyHttpStream() { 58 SpdyHttpStream::~SpdyHttpStream() {
58 if (stream_.get()) { 59 if (stream_.get()) {
59 stream_->DetachDelegate(); 60 stream_->DetachDelegate();
60 DCHECK(!stream_.get()); 61 DCHECK(!stream_.get());
61 } 62 }
62 } 63 }
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 weak_factory_.GetWeakPtr())); 443 weak_factory_.GetWeakPtr()));
443 444
444 if (rv != ERR_IO_PENDING) 445 if (rv != ERR_IO_PENDING)
445 OnRequestBodyReadCompleted(rv); 446 OnRequestBodyReadCompleted(rv);
446 } 447 }
447 448
448 void SpdyHttpStream::InitializeStreamHelper() { 449 void SpdyHttpStream::InitializeStreamHelper() {
449 stream_->SetDelegate(this); 450 stream_->SetDelegate(this);
450 stream_->GetSSLInfo(&ssl_info_); 451 stream_->GetSSLInfo(&ssl_info_);
451 was_alpn_negotiated_ = stream_->WasNpnNegotiated(); 452 was_alpn_negotiated_ = stream_->WasNpnNegotiated();
453 negotiated_protocol_ = stream_->GetNegotiatedProtocol();
452 } 454 }
453 455
454 void SpdyHttpStream::ResetStreamInternal() { 456 void SpdyHttpStream::ResetStreamInternal() {
455 spdy_session_->ResetStream(stream()->stream_id(), RST_STREAM_INTERNAL_ERROR, 457 spdy_session_->ResetStream(stream()->stream_id(), RST_STREAM_INTERNAL_ERROR,
456 std::string()); 458 std::string());
457 } 459 }
458 460
459 void SpdyHttpStream::OnRequestBodyReadCompleted(int status) { 461 void SpdyHttpStream::OnRequestBodyReadCompleted(int status) {
460 if (status < 0) { 462 if (status < 0) {
461 DCHECK_NE(ERR_IO_PENDING, status); 463 DCHECK_NE(ERR_IO_PENDING, status);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 details->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP2; 614 details->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP2;
613 return; 615 return;
614 } 616 }
615 617
616 void SpdyHttpStream::SetPriority(RequestPriority priority) { 618 void SpdyHttpStream::SetPriority(RequestPriority priority) {
617 // TODO(akalin): Plumb this through to |stream_request_| and 619 // TODO(akalin): Plumb this through to |stream_request_| and
618 // |stream_|. 620 // |stream_|.
619 } 621 }
620 622
621 } // namespace net 623 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_http_stream.h ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698