| 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/base/net_log.h" | 10 #include "net/base/net_log.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 virtual ~Request(); | 30 virtual ~Request(); |
| 31 | 31 |
| 32 // The GURL from the HttpRequestInfo the started the Request. | 32 // The GURL from the HttpRequestInfo the started the Request. |
| 33 const GURL& url() const { return url_; } | 33 const GURL& url() const { return url_; } |
| 34 | 34 |
| 35 // Called when the Job determines the appropriate |spdy_session_key| for the | 35 // Called when the Job determines the appropriate |spdy_session_key| for the |
| 36 // Request. Note that this does not mean that SPDY is necessarily supported | 36 // Request. Note that this does not mean that SPDY is necessarily supported |
| 37 // for this SpdySessionKey, since we may need to wait for NPN to complete | 37 // for this SpdySessionKey, since we may need to wait for NPN to complete |
| 38 // before knowing if SPDY is available. | 38 // before knowing if SPDY is available. |
| 39 void SetSpdySessionKey(const SpdySessionKey& spdy_session_key); | 39 void SetSpdySessionKey(const SpdySessionKey& spdy_session_key); |
| 40 bool HasSpdySessionKey() const; |
| 40 | 41 |
| 41 // Attaches |job| to this request. Does not mean that Request will use |job|, | 42 // Attaches |job| to this request. Does not mean that Request will use |job|, |
| 42 // but Request will own |job|. | 43 // but Request will own |job|. |
| 43 void AttachJob(HttpStreamFactoryImpl::Job* job); | 44 void AttachJob(HttpStreamFactoryImpl::Job* job); |
| 44 | 45 |
| 45 // Marks completion of the request. Must be called before OnStreamReady(). | 46 // Marks completion of the request. Must be called before OnStreamReady(). |
| 46 // |job_net_log| is the BoundNetLog of the Job that fulfilled this request. | 47 // |job_net_log| is the BoundNetLog of the Job that fulfilled this request. |
| 47 void Complete(bool was_npn_negotiated, | 48 void Complete(bool was_npn_negotiated, |
| 48 NextProto protocol_negotiated, | 49 NextProto protocol_negotiated, |
| 49 bool using_spdy, | 50 bool using_spdy, |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 // Protocol negotiated with the server. | 134 // Protocol negotiated with the server. |
| 134 NextProto protocol_negotiated_; | 135 NextProto protocol_negotiated_; |
| 135 bool using_spdy_; | 136 bool using_spdy_; |
| 136 | 137 |
| 137 DISALLOW_COPY_AND_ASSIGN(Request); | 138 DISALLOW_COPY_AND_ASSIGN(Request); |
| 138 }; | 139 }; |
| 139 | 140 |
| 140 } // namespace net | 141 } // namespace net |
| 141 | 142 |
| 142 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_ | 143 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_ |
| OLD | NEW |