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

Side by Side Diff: net/spdy/bidirectional_stream_spdy_impl.h

Issue 1992953004: [Cronet] Make delaying sending request headers explicit in bidirectional stream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review Created 4 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ 5 #ifndef NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_
6 #define NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ 6 #define NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 24 matching lines...) Expand all
35 public SpdyStream::Delegate { 35 public SpdyStream::Delegate {
36 public: 36 public:
37 explicit BidirectionalStreamSpdyImpl( 37 explicit BidirectionalStreamSpdyImpl(
38 const base::WeakPtr<SpdySession>& spdy_session); 38 const base::WeakPtr<SpdySession>& spdy_session);
39 39
40 ~BidirectionalStreamSpdyImpl() override; 40 ~BidirectionalStreamSpdyImpl() override;
41 41
42 // BidirectionalStreamImpl implementation: 42 // BidirectionalStreamImpl implementation:
43 void Start(const BidirectionalStreamRequestInfo* request_info, 43 void Start(const BidirectionalStreamRequestInfo* request_info,
44 const BoundNetLog& net_log, 44 const BoundNetLog& net_log,
45 bool disable_auto_flush, 45 bool delay_headers_until_next_send_data,
46 BidirectionalStreamImpl::Delegate* delegate, 46 BidirectionalStreamImpl::Delegate* delegate,
47 std::unique_ptr<base::Timer> timer) override; 47 std::unique_ptr<base::Timer> timer) override;
48 int ReadData(IOBuffer* buf, int buf_len) override; 48 int ReadData(IOBuffer* buf, int buf_len) override;
49 void SendData(const scoped_refptr<IOBuffer>& data, 49 void SendData(const scoped_refptr<IOBuffer>& data,
50 int length, 50 int length,
51 bool end_stream) override; 51 bool end_stream) override;
52 void SendvData(const std::vector<scoped_refptr<IOBuffer>>& buffers, 52 void SendvData(const std::vector<scoped_refptr<IOBuffer>>& buffers,
53 const std::vector<int>& lengths, 53 const std::vector<int>& lengths,
54 bool end_stream) override; 54 bool end_stream) override;
55 void Cancel() override; 55 void Cancel() override;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // Whether OnClose has been invoked. 93 // Whether OnClose has been invoked.
94 bool stream_closed_; 94 bool stream_closed_;
95 // Status reported in OnClose. 95 // Status reported in OnClose.
96 int closed_stream_status_; 96 int closed_stream_status_;
97 // After |stream_| has been closed, this keeps track of the total number of 97 // After |stream_| has been closed, this keeps track of the total number of
98 // bytes received over the network for |stream_| while it was open. 98 // bytes received over the network for |stream_| while it was open.
99 int64_t closed_stream_received_bytes_; 99 int64_t closed_stream_received_bytes_;
100 // After |stream_| has been closed, this keeps track of the total number of 100 // After |stream_| has been closed, this keeps track of the total number of
101 // bytes sent over the network for |stream_| while it was open. 101 // bytes sent over the network for |stream_| while it was open.
102 int64_t closed_stream_sent_bytes_; 102 int64_t closed_stream_sent_bytes_;
103 // Whether auto flush is disabled.
104 bool disable_auto_flush_;
105 // Only relevant when |disable_auto_flush_| is true;
106 // This is the combined buffer of buffers passed in through SendvData. 103 // This is the combined buffer of buffers passed in through SendvData.
104 // Keep a reference here so it is alive until OnDataSent is invoked.
107 scoped_refptr<IOBuffer> pending_combined_buffer_; 105 scoped_refptr<IOBuffer> pending_combined_buffer_;
108 106
109 base::WeakPtrFactory<BidirectionalStreamSpdyImpl> weak_factory_; 107 base::WeakPtrFactory<BidirectionalStreamSpdyImpl> weak_factory_;
110 108
111 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamSpdyImpl); 109 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamSpdyImpl);
112 }; 110 };
113 111
114 } // namespace net 112 } // namespace net
115 113
116 #endif // NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_ 114 #endif // NET_SPDY_BIDIRECTIONAL_STREAM_SPDY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698