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

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

Issue 200723004: Fix SPDY error-handling if the connection gets closed just after use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/http/http_stream_factory_impl_request.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "net/base/net_log.h" 10 #include "net/base/net_log.h"
11 #include "net/http/http_stream_factory_impl.h" 11 #include "net/http/http_stream_factory_impl.h"
12 #include "net/socket/ssl_client_socket.h" 12 #include "net/socket/ssl_client_socket.h"
13 #include "net/spdy/spdy_session_key.h" 13 #include "net/spdy/spdy_session_key.h"
14 #include "url/gurl.h" 14 #include "url/gurl.h"
15 15
16 namespace net { 16 namespace net {
17 17
18 class ClientSocketHandle; 18 class ClientSocketHandle;
19 class HttpStream;
19 class SpdySession; 20 class SpdySession;
20 21
21 class HttpStreamFactoryImpl::Request : public HttpStreamRequest { 22 class HttpStreamFactoryImpl::Request : public HttpStreamRequest {
22 public: 23 public:
23 Request(const GURL& url, 24 Request(const GURL& url,
24 HttpStreamFactoryImpl* factory, 25 HttpStreamFactoryImpl* factory,
25 HttpStreamRequest::Delegate* delegate, 26 HttpStreamRequest::Delegate* delegate,
26 WebSocketHandshakeStreamBase::CreateHelper* 27 WebSocketHandshakeStreamBase::CreateHelper*
27 websocket_handshake_stream_create_helper, 28 websocket_handshake_stream_create_helper,
28 const BoundNetLog& net_log); 29 const BoundNetLog& net_log);
(...skipping 28 matching lines...) Expand all
57 // If this Request has a |spdy_session_key_|, remove this session from the 58 // If this Request has a |spdy_session_key_|, remove this session from the
58 // SpdySessionRequestMap. 59 // SpdySessionRequestMap.
59 void RemoveRequestFromSpdySessionRequestMap(); 60 void RemoveRequestFromSpdySessionRequestMap();
60 61
61 // If this Request has a |http_pipelining_key_|, remove this session from the 62 // If this Request has a |http_pipelining_key_|, remove this session from the
62 // HttpPipeliningRequestMap. 63 // HttpPipeliningRequestMap.
63 void RemoveRequestFromHttpPipeliningRequestMap(); 64 void RemoveRequestFromHttpPipeliningRequestMap();
64 65
65 // Called by an attached Job if it sets up a SpdySession. 66 // Called by an attached Job if it sets up a SpdySession.
66 void OnNewSpdySessionReady(Job* job, 67 void OnNewSpdySessionReady(Job* job,
68 scoped_ptr<HttpStream> stream,
67 const base::WeakPtr<SpdySession>& spdy_session, 69 const base::WeakPtr<SpdySession>& spdy_session,
68 bool direct); 70 bool direct);
69 71
70 WebSocketHandshakeStreamBase::CreateHelper* 72 WebSocketHandshakeStreamBase::CreateHelper*
71 websocket_handshake_stream_create_helper() { 73 websocket_handshake_stream_create_helper() {
72 return websocket_handshake_stream_create_helper_; 74 return websocket_handshake_stream_create_helper_;
73 } 75 }
74 76
75 // HttpStreamRequest::Delegate methods which we implement. Note we don't 77 // HttpStreamRequest::Delegate methods which we implement. Note we don't
76 // actually subclass HttpStreamRequest::Delegate. 78 // actually subclass HttpStreamRequest::Delegate.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // Protocol negotiated with the server. 144 // Protocol negotiated with the server.
143 NextProto protocol_negotiated_; 145 NextProto protocol_negotiated_;
144 bool using_spdy_; 146 bool using_spdy_;
145 147
146 DISALLOW_COPY_AND_ASSIGN(Request); 148 DISALLOW_COPY_AND_ASSIGN(Request);
147 }; 149 };
148 150
149 } // namespace net 151 } // namespace net
150 152
151 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_ 153 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_job.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