| 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_QUIC_CHROMIUM_QUIC_STREAM_FACTORY_H_ | 5 #ifndef NET_QUIC_CHROMIUM_QUIC_STREAM_FACTORY_H_ |
| 6 #define NET_QUIC_CHROMIUM_QUIC_STREAM_FACTORY_H_ | 6 #define NET_QUIC_CHROMIUM_QUIC_STREAM_FACTORY_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 MIGRATION_STATUS_DISABLED, | 102 MIGRATION_STATUS_DISABLED, |
| 103 MIGRATION_STATUS_NO_ALTERNATE_NETWORK, | 103 MIGRATION_STATUS_NO_ALTERNATE_NETWORK, |
| 104 MIGRATION_STATUS_MAX | 104 MIGRATION_STATUS_MAX |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 // Encapsulates a pending request for a QuicHttpStream. | 107 // Encapsulates a pending request for a QuicHttpStream. |
| 108 // If the request is still pending when it is destroyed, it will | 108 // If the request is still pending when it is destroyed, it will |
| 109 // cancel the request with the factory. | 109 // cancel the request with the factory. |
| 110 class NET_EXPORT_PRIVATE QuicStreamRequest { | 110 class NET_EXPORT_PRIVATE QuicStreamRequest { |
| 111 public: | 111 public: |
| 112 explicit QuicStreamRequest(QuicStreamFactory* factory); | 112 explicit QuicStreamRequest(QuicStreamFactory* factory, |
| 113 HttpServerProperties* http_server_properties); |
| 113 ~QuicStreamRequest(); | 114 ~QuicStreamRequest(); |
| 114 | 115 |
| 115 // |cert_verify_flags| is bitwise OR'd of CertVerifier::VerifyFlags and it is | 116 // |cert_verify_flags| is bitwise OR'd of CertVerifier::VerifyFlags and it is |
| 116 // passed to CertVerifier::Verify. | 117 // passed to CertVerifier::Verify. |
| 117 // |destination| will be resolved and resulting IPEndPoint used to open a | 118 // |destination| will be resolved and resulting IPEndPoint used to open a |
| 118 // QuicConnection. This can be different than HostPortPair::FromURL(url). | 119 // QuicConnection. This can be different than HostPortPair::FromURL(url). |
| 119 int Request(const HostPortPair& destination, | 120 int Request(const HostPortPair& destination, |
| 120 PrivacyMode privacy_mode, | 121 PrivacyMode privacy_mode, |
| 121 int cert_verify_flags, | 122 int cert_verify_flags, |
| 122 const GURL& url, | 123 const GURL& url, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 136 | 137 |
| 137 // Sets |session_|. | 138 // Sets |session_|. |
| 138 void SetSession(QuicChromiumClientSession* session); | 139 void SetSession(QuicChromiumClientSession* session); |
| 139 | 140 |
| 140 const QuicServerId& server_id() const { return server_id_; } | 141 const QuicServerId& server_id() const { return server_id_; } |
| 141 | 142 |
| 142 const NetLogWithSource& net_log() const { return net_log_; } | 143 const NetLogWithSource& net_log() const { return net_log_; } |
| 143 | 144 |
| 144 private: | 145 private: |
| 145 QuicStreamFactory* factory_; | 146 QuicStreamFactory* factory_; |
| 147 HttpServerProperties* http_server_properties_; |
| 146 QuicServerId server_id_; | 148 QuicServerId server_id_; |
| 147 NetLogWithSource net_log_; | 149 NetLogWithSource net_log_; |
| 148 CompletionCallback callback_; | 150 CompletionCallback callback_; |
| 149 base::WeakPtr<QuicChromiumClientSession> session_; | 151 base::WeakPtr<QuicChromiumClientSession> session_; |
| 150 | 152 |
| 151 DISALLOW_COPY_AND_ASSIGN(QuicStreamRequest); | 153 DISALLOW_COPY_AND_ASSIGN(QuicStreamRequest); |
| 152 }; | 154 }; |
| 153 | 155 |
| 154 // A factory for creating new QuicHttpStreams on top of a pool of | 156 // A factory for creating new QuicHttpStreams on top of a pool of |
| 155 // QuicChromiumClientSessions. | 157 // QuicChromiumClientSessions. |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 const scoped_refptr<SSLConfigService> ssl_config_service_; | 678 const scoped_refptr<SSLConfigService> ssl_config_service_; |
| 677 | 679 |
| 678 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; | 680 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; |
| 679 | 681 |
| 680 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); | 682 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); |
| 681 }; | 683 }; |
| 682 | 684 |
| 683 } // namespace net | 685 } // namespace net |
| 684 | 686 |
| 685 #endif // NET_QUIC_CHROMIUM_QUIC_STREAM_FACTORY_H_ | 687 #endif // NET_QUIC_CHROMIUM_QUIC_STREAM_FACTORY_H_ |
| OLD | NEW |