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

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

Issue 2805043004: Add a GetAlternativeService method to HttpStream to return any (Closed)
Patch Set: Created 3 years, 8 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 int ReadResponseHeaders(const CompletionCallback& callback) override; 57 int ReadResponseHeaders(const CompletionCallback& callback) override;
58 int ReadResponseBody(IOBuffer* buf, 58 int ReadResponseBody(IOBuffer* buf,
59 int buf_len, 59 int buf_len,
60 const CompletionCallback& callback) override; 60 const CompletionCallback& callback) override;
61 void Close(bool not_reusable) override; 61 void Close(bool not_reusable) override;
62 bool IsResponseBodyComplete() const override; 62 bool IsResponseBodyComplete() const override;
63 bool IsConnectionReused() const override; 63 bool IsConnectionReused() const override;
64 int64_t GetTotalReceivedBytes() const override; 64 int64_t GetTotalReceivedBytes() const override;
65 int64_t GetTotalSentBytes() const override; 65 int64_t GetTotalSentBytes() const override;
66 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; 66 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
67 bool GetAlternativeService(
68 AlternativeService* alternative_service) const override;
67 void PopulateNetErrorDetails(NetErrorDetails* details) override; 69 void PopulateNetErrorDetails(NetErrorDetails* details) override;
68 void SetPriority(RequestPriority priority) override; 70 void SetPriority(RequestPriority priority) override;
69 71
70 // QuicChromiumClientStream::Delegate implementation 72 // QuicChromiumClientStream::Delegate implementation
71 void OnHeadersAvailable(const SpdyHeaderBlock& headers, 73 void OnHeadersAvailable(const SpdyHeaderBlock& headers,
72 size_t frame_len) override; 74 size_t frame_len) override;
73 void OnDataAvailable() override; 75 void OnDataAvailable() override;
74 void OnClose() override; 76 void OnClose() override;
75 void OnError(int error) override; 77 void OnError(int error) override;
76 bool HasSendHeadersComplete() override; 78 bool HasSendHeadersComplete() override;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // Sets |response_status_| to |response_status| and sets 145 // Sets |response_status_| to |response_status| and sets
144 // |has_response_status_| to true. 146 // |has_response_status_| to true.
145 void SetResponseStatus(int response_status); 147 void SetResponseStatus(int response_status);
146 // Computes the correct response status based on the status of the handshake, 148 // Computes the correct response status based on the status of the handshake,
147 // |session_error|, |connection_error| and |stream_error|. 149 // |session_error|, |connection_error| and |stream_error|.
148 int ComputeResponseStatus() const; 150 int ComputeResponseStatus() const;
149 151
150 State next_state_; 152 State next_state_;
151 153
152 base::WeakPtr<QuicChromiumClientSession> session_; 154 base::WeakPtr<QuicChromiumClientSession> session_;
155 const QuicServerId server_id_; // The ID of the QUIC server for this stream.
153 156
154 HttpServerProperties* http_server_properties_; 157 HttpServerProperties* http_server_properties_;
155 158
156 QuicVersion quic_version_; 159 QuicVersion quic_version_;
157 int session_error_; // Error code from the connection shutdown. 160 int session_error_; // Error code from the connection shutdown.
158 bool was_handshake_confirmed_; // True if the crypto handshake succeeded. 161 bool was_handshake_confirmed_; // True if the crypto handshake succeeded.
159 QuicChromiumClientSession::StreamRequest stream_request_; 162 QuicChromiumClientSession::StreamRequest stream_request_;
160 QuicChromiumClientStream* stream_; // Non-owning. 163 QuicChromiumClientStream* stream_; // Non-owning.
161 164
162 // The following three fields are all owned by the caller and must 165 // The following three fields are all owned by the caller and must
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 LoadTimingInfo::ConnectTiming connect_timing_; 238 LoadTimingInfo::ConnectTiming connect_timing_;
236 239
237 base::WeakPtrFactory<QuicHttpStream> weak_factory_; 240 base::WeakPtrFactory<QuicHttpStream> weak_factory_;
238 241
239 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); 242 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream);
240 }; 243 };
241 244
242 } // namespace net 245 } // namespace net
243 246
244 #endif // NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ 247 #endif // NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698