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

Side by Side Diff: net/quic/chromium/quic_http_stream.h

Issue 2877063002: Add an async ReadBody method to QuicChromiumClientStream::Handle (Closed)
Patch Set: Created 3 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 (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 #ifndef NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ 5 #ifndef NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_
6 #define NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ 6 #define NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 bool IsConnectionReused() const override; 62 bool IsConnectionReused() const override;
63 int64_t GetTotalReceivedBytes() const override; 63 int64_t GetTotalReceivedBytes() const override;
64 int64_t GetTotalSentBytes() const override; 64 int64_t GetTotalSentBytes() const override;
65 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; 65 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
66 bool GetAlternativeService( 66 bool GetAlternativeService(
67 AlternativeService* alternative_service) const override; 67 AlternativeService* alternative_service) const override;
68 void PopulateNetErrorDetails(NetErrorDetails* details) override; 68 void PopulateNetErrorDetails(NetErrorDetails* details) override;
69 void SetPriority(RequestPriority priority) override; 69 void SetPriority(RequestPriority priority) override;
70 70
71 // QuicChromiumClientStream::Delegate implementation 71 // QuicChromiumClientStream::Delegate implementation
72 void OnDataAvailable() override;
73 void OnTrailingHeadersAvailable(const SpdyHeaderBlock& headers, 72 void OnTrailingHeadersAvailable(const SpdyHeaderBlock& headers,
74 size_t frame_len) override; 73 size_t frame_len) override;
75 void OnClose() override; 74 void OnClose() override;
76 void OnError(int error) override; 75 void OnError(int error) override;
77 76
78 // QuicClientPushPromiseIndex::Delegate implementation 77 // QuicClientPushPromiseIndex::Delegate implementation
79 bool CheckVary(const SpdyHeaderBlock& client_request, 78 bool CheckVary(const SpdyHeaderBlock& client_request,
80 const SpdyHeaderBlock& promise_request, 79 const SpdyHeaderBlock& promise_request,
81 const SpdyHeaderBlock& promise_response) override; 80 const SpdyHeaderBlock& promise_response) override;
82 // TODO(rch): QuicClientPushPromiseIndex::Delegate is part of shared code. 81 // TODO(rch): QuicClientPushPromiseIndex::Delegate is part of shared code.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 int DoSendHeaders(); 117 int DoSendHeaders();
119 int DoSendHeadersComplete(int rv); 118 int DoSendHeadersComplete(int rv);
120 int DoReadRequestBody(); 119 int DoReadRequestBody();
121 int DoReadRequestBodyComplete(int rv); 120 int DoReadRequestBodyComplete(int rv);
122 int DoSendBody(); 121 int DoSendBody();
123 int DoSendBodyComplete(int rv); 122 int DoSendBodyComplete(int rv);
124 123
125 void OnReadResponseHeadersComplete(int rv); 124 void OnReadResponseHeadersComplete(int rv);
126 int ProcessResponseHeaders(const SpdyHeaderBlock& headers); 125 int ProcessResponseHeaders(const SpdyHeaderBlock& headers);
127 126
128 int ReadAvailableData(IOBuffer* buf, int buf_len); 127 void OnReadBodyComplete(int rv);
128 int HandleReadComplete(int rv);
129
129 void EnterStateSendHeaders(); 130 void EnterStateSendHeaders();
130 131
131 void ResetStream(); 132 void ResetStream();
132 133
133 // If |has_response_status_| is false, sets |response_status| to the result 134 // If |has_response_status_| is false, sets |response_status| to the result
134 // of ComputeResponseStatus(). Returns |response_status_|. 135 // of ComputeResponseStatus(). Returns |response_status_|.
135 int GetResponseStatus(); 136 int GetResponseStatus();
136 // Sets the result of |ComputeResponseStatus()| as the |response_status_|. 137 // Sets the result of |ComputeResponseStatus()| as the |response_status_|.
137 void SaveResponseStatus(); 138 void SaveResponseStatus();
138 // Sets |response_status_| to |response_status| and sets 139 // Sets |response_status_| to |response_status| and sets
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 LoadTimingInfo::ConnectTiming connect_timing_; 232 LoadTimingInfo::ConnectTiming connect_timing_;
232 233
233 base::WeakPtrFactory<QuicHttpStream> weak_factory_; 234 base::WeakPtrFactory<QuicHttpStream> weak_factory_;
234 235
235 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); 236 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream);
236 }; 237 };
237 238
238 } // namespace net 239 } // namespace net
239 240
240 #endif // NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ 241 #endif // NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698