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

Side by Side Diff: net/http/bidirectional_stream_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_HTTP_BIDIRECTIONAL_STREAM_IMPL_H_ 5 #ifndef NET_HTTP_BIDIRECTIONAL_STREAM_IMPL_H_
6 #define NET_HTTP_BIDIRECTIONAL_STREAM_IMPL_H_ 6 #define NET_HTTP_BIDIRECTIONAL_STREAM_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 BidirectionalStreamImpl(); 86 BidirectionalStreamImpl();
87 87
88 // |this| should not be destroyed during Delegate::OnHeadersSent or 88 // |this| should not be destroyed during Delegate::OnHeadersSent or
89 // Delegate::OnDataSent. 89 // Delegate::OnDataSent.
90 virtual ~BidirectionalStreamImpl(); 90 virtual ~BidirectionalStreamImpl();
91 91
92 // Starts the BidirectionalStreamImpl and sends request headers. 92 // Starts the BidirectionalStreamImpl and sends request headers.
93 virtual void Start(const BidirectionalStreamRequestInfo* request_info, 93 virtual void Start(const BidirectionalStreamRequestInfo* request_info,
94 const BoundNetLog& net_log, 94 const BoundNetLog& net_log,
95 bool disable_auto_flush, 95 bool delay_headers_until_next_send_data,
96 BidirectionalStreamImpl::Delegate* delegate, 96 BidirectionalStreamImpl::Delegate* delegate,
97 std::unique_ptr<base::Timer> timer) = 0; 97 std::unique_ptr<base::Timer> timer) = 0;
98 98
99 // Reads at most |buf_len| bytes into |buf|. Returns the number of bytes read, 99 // Reads at most |buf_len| bytes into |buf|. Returns the number of bytes read,
100 // ERR_IO_PENDING if the read is to be completed asynchronously, or an error 100 // ERR_IO_PENDING if the read is to be completed asynchronously, or an error
101 // code if any error occurred. If returns 0, there is no more data to read. 101 // code if any error occurred. If returns 0, there is no more data to read.
102 // This should not be called before Delegate::OnHeadersReceived is invoked, 102 // This should not be called before Delegate::OnHeadersReceived is invoked,
103 // and should not be called again unless it returns with number greater than 103 // and should not be called again unless it returns with number greater than
104 // 0 or until Delegate::OnDataRead is invoked. 104 // 0 or until Delegate::OnDataRead is invoked.
105 virtual int ReadData(IOBuffer* buf, int buf_len) = 0; 105 virtual int ReadData(IOBuffer* buf, int buf_len) = 0;
(...skipping 29 matching lines...) Expand all
135 // not associated with any stream, and are not included in this value. 135 // not associated with any stream, and are not included in this value.
136 virtual int64_t GetTotalSentBytes() const = 0; 136 virtual int64_t GetTotalSentBytes() const = 0;
137 137
138 private: 138 private:
139 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamImpl); 139 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamImpl);
140 }; 140 };
141 141
142 } // namespace net 142 } // namespace net
143 143
144 #endif // NET_HTTP_BIDIRECTIONAL_STREAM_IMPL_H_ 144 #endif // NET_HTTP_BIDIRECTIONAL_STREAM_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698