OLD | NEW |
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/http/http_stream_factory_impl.h" | 10 #include "net/http/http_stream_factory_impl.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // for this SpdySessionKey, since we may need to wait for NPN to complete | 41 // for this SpdySessionKey, since we may need to wait for NPN to complete |
42 // before knowing if SPDY is available. | 42 // before knowing if SPDY is available. |
43 void SetSpdySessionKey(const SpdySessionKey& spdy_session_key); | 43 void SetSpdySessionKey(const SpdySessionKey& spdy_session_key); |
44 bool HasSpdySessionKey() const; | 44 bool HasSpdySessionKey() const; |
45 | 45 |
46 // Attaches |job| to this request. Does not mean that Request will use |job|, | 46 // Attaches |job| to this request. Does not mean that Request will use |job|, |
47 // but Request will own |job|. | 47 // but Request will own |job|. |
48 void AttachJob(HttpStreamFactoryImpl::Job* job); | 48 void AttachJob(HttpStreamFactoryImpl::Job* job); |
49 | 49 |
50 // Marks completion of the request. Must be called before OnStreamReady(). | 50 // Marks completion of the request. Must be called before OnStreamReady(). |
51 // |job_net_log| is the BoundNetLog of the Job that fulfilled this request. | |
52 void Complete(bool was_npn_negotiated, | 51 void Complete(bool was_npn_negotiated, |
53 NextProto protocol_negotiated, | 52 NextProto protocol_negotiated, |
54 bool using_spdy, | 53 bool using_spdy); |
55 const BoundNetLog& job_net_log); | |
56 | 54 |
57 // If this Request has a |spdy_session_key_|, remove this session from the | 55 // If this Request has a |spdy_session_key_|, remove this session from the |
58 // SpdySessionRequestMap. | 56 // SpdySessionRequestMap. |
59 void RemoveRequestFromSpdySessionRequestMap(); | 57 void RemoveRequestFromSpdySessionRequestMap(); |
60 | 58 |
61 // Called by an attached Job if it sets up a SpdySession. | 59 // Called by an attached Job if it sets up a SpdySession. |
62 void OnNewSpdySessionReady(Job* job, | 60 void OnNewSpdySessionReady(Job* job, |
63 scoped_ptr<HttpStream> stream, | 61 scoped_ptr<HttpStream> stream, |
64 const base::WeakPtr<SpdySession>& spdy_session, | 62 const base::WeakPtr<SpdySession>& spdy_session, |
65 bool direct); | 63 bool direct); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 NextProto protocol_negotiated_; | 144 NextProto protocol_negotiated_; |
147 bool using_spdy_; | 145 bool using_spdy_; |
148 ConnectionAttempts connection_attempts_; | 146 ConnectionAttempts connection_attempts_; |
149 | 147 |
150 DISALLOW_COPY_AND_ASSIGN(Request); | 148 DISALLOW_COPY_AND_ASSIGN(Request); |
151 }; | 149 }; |
152 | 150 |
153 } // namespace net | 151 } // namespace net |
154 | 152 |
155 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_ | 153 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_ |
OLD | NEW |