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

Side by Side Diff: net/http/http_stream_factory_impl_request.h

Issue 2347163002: s/NPN/ALPN/ (Closed)
Patch Set: Re: #12. Created 4 years, 3 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_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_ 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_
6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_ 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 const BoundNetLog& net_log() const { return net_log_; } 63 const BoundNetLog& net_log() const { return net_log_; }
64 64
65 // Called when the |helper_| determines the appropriate |spdy_session_key| 65 // Called when the |helper_| determines the appropriate |spdy_session_key|
66 // for the Request. Note that this does not mean that SPDY is necessarily 66 // for the Request. Note that this does not mean that SPDY is necessarily
67 // supported for this SpdySessionKey, since we may need to wait for NPN to 67 // supported for this SpdySessionKey, since we may need to wait for NPN to
68 // complete before knowing if SPDY is available. 68 // complete before knowing if SPDY is available.
69 void SetSpdySessionKey(const SpdySessionKey& spdy_session_key); 69 void SetSpdySessionKey(const SpdySessionKey& spdy_session_key);
70 bool HasSpdySessionKey() const; 70 bool HasSpdySessionKey() const;
71 71
72 // Marks completion of the request. Must be called before OnStreamReady(). 72 // Marks completion of the request. Must be called before OnStreamReady().
73 void Complete(bool was_npn_negotiated, 73 void Complete(bool was_alpn_negotiated,
74 NextProto negotiated_protocol, 74 NextProto negotiated_protocol,
75 bool using_spdy); 75 bool using_spdy);
76 76
77 void ResetSpdySessionKey(); 77 void ResetSpdySessionKey();
78 78
79 // Called by |helper_| to record connection attempts made by the socket 79 // Called by |helper_| to record connection attempts made by the socket
80 // layer in an attached Job for this stream request. 80 // layer in an attached Job for this stream request.
81 void AddConnectionAttempts(const ConnectionAttempts& attempts); 81 void AddConnectionAttempts(const ConnectionAttempts& attempts);
82 82
83 WebSocketHandshakeStreamBase::CreateHelper* 83 WebSocketHandshakeStreamBase::CreateHelper*
(...skipping 28 matching lines...) Expand all
112 const HttpResponseInfo& response_info, 112 const HttpResponseInfo& response_info,
113 const SSLConfig& used_ssl_config, 113 const SSLConfig& used_ssl_config,
114 const ProxyInfo& used_proxy_info, 114 const ProxyInfo& used_proxy_info,
115 HttpStream* stream); 115 HttpStream* stream);
116 116
117 // HttpStreamRequest methods. 117 // HttpStreamRequest methods.
118 118
119 int RestartTunnelWithProxyAuth(const AuthCredentials& credentials) override; 119 int RestartTunnelWithProxyAuth(const AuthCredentials& credentials) override;
120 void SetPriority(RequestPriority priority) override; 120 void SetPriority(RequestPriority priority) override;
121 LoadState GetLoadState() const override; 121 LoadState GetLoadState() const override;
122 bool was_npn_negotiated() const override; 122 bool was_alpn_negotiated() const override;
123 NextProto negotiated_protocol() const override; 123 NextProto negotiated_protocol() const override;
124 bool using_spdy() const override; 124 bool using_spdy() const override;
125 const ConnectionAttempts& connection_attempts() const override; 125 const ConnectionAttempts& connection_attempts() const override;
126 HttpStreamRequest::StreamType stream_type() const { return stream_type_; } 126 HttpStreamRequest::StreamType stream_type() const { return stream_type_; }
127 const SpdySessionKey* spdy_session_key() const { 127 const SpdySessionKey* spdy_session_key() const {
128 return spdy_session_key_.get(); 128 return spdy_session_key_.get();
129 } 129 }
130 130
131 private: 131 private:
132 const GURL url_; 132 const GURL url_;
133 133
134 // Unowned. The helper must outlive this request. 134 // Unowned. The helper must outlive this request.
135 Helper* helper_; 135 Helper* helper_;
136 136
137 WebSocketHandshakeStreamBase::CreateHelper* const 137 WebSocketHandshakeStreamBase::CreateHelper* const
138 websocket_handshake_stream_create_helper_; 138 websocket_handshake_stream_create_helper_;
139 HttpStreamRequest::Delegate* const delegate_; 139 HttpStreamRequest::Delegate* const delegate_;
140 const BoundNetLog net_log_; 140 const BoundNetLog net_log_;
141 141
142 std::unique_ptr<const SpdySessionKey> spdy_session_key_; 142 std::unique_ptr<const SpdySessionKey> spdy_session_key_;
143 143
144 bool completed_; 144 bool completed_;
145 bool was_npn_negotiated_; 145 bool was_alpn_negotiated_;
146 // Protocol negotiated with the server. 146 // Protocol negotiated with the server.
147 NextProto negotiated_protocol_; 147 NextProto negotiated_protocol_;
148 bool using_spdy_; 148 bool using_spdy_;
149 ConnectionAttempts connection_attempts_; 149 ConnectionAttempts connection_attempts_;
150 150
151 const HttpStreamRequest::StreamType stream_type_; 151 const HttpStreamRequest::StreamType stream_type_;
152 DISALLOW_COPY_AND_ASSIGN(Request); 152 DISALLOW_COPY_AND_ASSIGN(Request);
153 }; 153 };
154 154
155 } // namespace net 155 } // namespace net
156 156
157 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_ 157 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_job_controller.cc ('k') | net/http/http_stream_factory_impl_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698