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

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

Issue 1812823010: Rename net::BidirectionalStream*Job to net::BidirectionalStream*Impl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 9 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 <set> 8 #include <set>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "net/http/http_stream_factory_impl.h" 12 #include "net/http/http_stream_factory_impl.h"
13 #include "net/log/net_log.h" 13 #include "net/log/net_log.h"
14 #include "net/socket/connection_attempts.h" 14 #include "net/socket/connection_attempts.h"
15 #include "net/socket/ssl_client_socket.h" 15 #include "net/socket/ssl_client_socket.h"
16 #include "net/spdy/spdy_session_key.h" 16 #include "net/spdy/spdy_session_key.h"
17 #include "net/ssl/ssl_failure_state.h" 17 #include "net/ssl/ssl_failure_state.h"
18 #include "url/gurl.h" 18 #include "url/gurl.h"
19 19
20 namespace net { 20 namespace net {
21 21
22 class BidirectionalStreamJob; 22 class BidirectionalStreamImpl;
23 class ClientSocketHandle; 23 class ClientSocketHandle;
24 class HttpStream; 24 class HttpStream;
25 class SpdySession; 25 class SpdySession;
26 26
27 class HttpStreamFactoryImpl::Request : public HttpStreamRequest { 27 class HttpStreamFactoryImpl::Request : public HttpStreamRequest {
28 public: 28 public:
29 Request(const GURL& url, 29 Request(const GURL& url,
30 HttpStreamFactoryImpl* factory, 30 HttpStreamFactoryImpl* factory,
31 HttpStreamRequest::Delegate* delegate, 31 HttpStreamRequest::Delegate* delegate,
32 WebSocketHandshakeStreamBase::CreateHelper* 32 WebSocketHandshakeStreamBase::CreateHelper*
(...skipping 23 matching lines...) Expand all
56 void Complete(bool was_npn_negotiated, 56 void Complete(bool was_npn_negotiated,
57 NextProto protocol_negotiated, 57 NextProto protocol_negotiated,
58 bool using_spdy); 58 bool using_spdy);
59 59
60 // If this Request has a |spdy_session_key_|, remove this session from the 60 // If this Request has a |spdy_session_key_|, remove this session from the
61 // SpdySessionRequestMap. 61 // SpdySessionRequestMap.
62 void RemoveRequestFromSpdySessionRequestMap(); 62 void RemoveRequestFromSpdySessionRequestMap();
63 63
64 // Called by an attached Job if it sets up a SpdySession. 64 // Called by an attached Job if it sets up a SpdySession.
65 // |stream| is null when |stream_type| is HttpStreamRequest::HTTP_STREAM. 65 // |stream| is null when |stream_type| is HttpStreamRequest::HTTP_STREAM.
66 // |bidirectional_stream_spdy_job| is null when |stream_type| is 66 // |bidirectional_stream_spdy_impl| is null when |stream_type| is
67 // HttpStreamRequest::BIDIRECTIONAL_STREAM. 67 // HttpStreamRequest::BIDIRECTIONAL_STREAM.
68 void OnNewSpdySessionReady( 68 void OnNewSpdySessionReady(
69 Job* job, 69 Job* job,
70 scoped_ptr<HttpStream> stream, 70 scoped_ptr<HttpStream> stream,
71 scoped_ptr<BidirectionalStreamJob> bidirectional_stream_spdy_job, 71 scoped_ptr<BidirectionalStreamImpl> bidirectional_stream_spdy_impl,
72 const base::WeakPtr<SpdySession>& spdy_session, 72 const base::WeakPtr<SpdySession>& spdy_session,
73 bool direct); 73 bool direct);
74 74
75 // Called by an attached Job to record connection attempts made by the socket 75 // Called by an attached Job to record connection attempts made by the socket
76 // layer for this stream request. 76 // layer for this stream request.
77 void AddConnectionAttempts(const ConnectionAttempts& attempts); 77 void AddConnectionAttempts(const ConnectionAttempts& attempts);
78 78
79 WebSocketHandshakeStreamBase::CreateHelper* 79 WebSocketHandshakeStreamBase::CreateHelper*
80 websocket_handshake_stream_create_helper() { 80 websocket_handshake_stream_create_helper() {
81 return websocket_handshake_stream_create_helper_; 81 return websocket_handshake_stream_create_helper_;
82 } 82 }
83 83
84 // HttpStreamRequest::Delegate methods which we implement. Note we don't 84 // HttpStreamRequest::Delegate methods which we implement. Note we don't
85 // actually subclass HttpStreamRequest::Delegate. 85 // actually subclass HttpStreamRequest::Delegate.
86 86
87 void OnStreamReady(Job* job, 87 void OnStreamReady(Job* job,
88 const SSLConfig& used_ssl_config, 88 const SSLConfig& used_ssl_config,
89 const ProxyInfo& used_proxy_info, 89 const ProxyInfo& used_proxy_info,
90 HttpStream* stream); 90 HttpStream* stream);
91 void OnBidirectionalStreamJobReady(Job* job, 91 void OnBidirectionalStreamImplReady(Job* job,
92 const SSLConfig& used_ssl_config, 92 const SSLConfig& used_ssl_config,
93 const ProxyInfo& used_proxy_info, 93 const ProxyInfo& used_proxy_info,
94 BidirectionalStreamJob* stream); 94 BidirectionalStreamImpl* stream);
95 95
96 void OnWebSocketHandshakeStreamReady(Job* job, 96 void OnWebSocketHandshakeStreamReady(Job* job,
97 const SSLConfig& used_ssl_config, 97 const SSLConfig& used_ssl_config,
98 const ProxyInfo& used_proxy_info, 98 const ProxyInfo& used_proxy_info,
99 WebSocketHandshakeStreamBase* stream); 99 WebSocketHandshakeStreamBase* stream);
100 void OnStreamFailed(Job* job, 100 void OnStreamFailed(Job* job,
101 int status, 101 int status,
102 const SSLConfig& used_ssl_config, 102 const SSLConfig& used_ssl_config,
103 SSLFailureState ssl_failure_state); 103 SSLFailureState ssl_failure_state);
104 void OnCertificateError(Job* job, 104 void OnCertificateError(Job* job,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 bool using_spdy_; 163 bool using_spdy_;
164 ConnectionAttempts connection_attempts_; 164 ConnectionAttempts connection_attempts_;
165 165
166 const HttpStreamRequest::StreamType stream_type_; 166 const HttpStreamRequest::StreamType stream_type_;
167 DISALLOW_COPY_AND_ASSIGN(Request); 167 DISALLOW_COPY_AND_ASSIGN(Request);
168 }; 168 };
169 169
170 } // namespace net 170 } // namespace net
171 171
172 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_ 172 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698