Chromium Code Reviews| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 128 | 128 |
| 129 // Helper method that calls |factory_|'s GetTimeDelayForWaitingJob(). It | 129 // Helper method that calls |factory_|'s GetTimeDelayForWaitingJob(). It |
| 130 // returns the amount of time waiting job should be delayed. | 130 // returns the amount of time waiting job should be delayed. |
| 131 base::TimeDelta GetTimeDelayForWaitingJob() const; | 131 base::TimeDelta GetTimeDelayForWaitingJob() const; |
| 132 | 132 |
| 133 std::unique_ptr<HttpStream> CreateStream(); | 133 std::unique_ptr<HttpStream> CreateStream(); |
| 134 | 134 |
| 135 std::unique_ptr<BidirectionalStreamImpl> CreateBidirectionalStreamImpl(); | 135 std::unique_ptr<BidirectionalStreamImpl> CreateBidirectionalStreamImpl(); |
| 136 | 136 |
| 137 // Sets |session_|. | 137 // Sets |session_|. |
| 138 void SetSession(QuicChromiumClientSession* session); | 138 void SetSession(const QuicChromiumClientSession::Handle& session); |
|
xunjieli
2017/05/04 16:54:42
I think for simplicity we should keep this as Quic
Ryan Hamilton
2017/05/04 18:45:53
Hm. I'm not sure I follow you. My vision (perhaps
| |
| 139 | 139 |
| 140 const QuicServerId& server_id() const { return server_id_; } | 140 const QuicServerId& server_id() const { return server_id_; } |
| 141 | 141 |
| 142 const NetLogWithSource& net_log() const { return net_log_; } | 142 const NetLogWithSource& net_log() const { return net_log_; } |
| 143 | 143 |
| 144 private: | 144 private: |
| 145 QuicStreamFactory* factory_; | 145 QuicStreamFactory* factory_; |
| 146 HttpServerProperties* http_server_properties_; | 146 HttpServerProperties* http_server_properties_; |
| 147 QuicServerId server_id_; | 147 QuicServerId server_id_; |
| 148 NetLogWithSource net_log_; | 148 NetLogWithSource net_log_; |
| 149 CompletionCallback callback_; | 149 CompletionCallback callback_; |
| 150 base::WeakPtr<QuicChromiumClientSession> session_; | 150 std::unique_ptr<QuicChromiumClientSession::Handle> session_; |
| 151 | 151 |
| 152 DISALLOW_COPY_AND_ASSIGN(QuicStreamRequest); | 152 DISALLOW_COPY_AND_ASSIGN(QuicStreamRequest); |
| 153 }; | 153 }; |
| 154 | 154 |
| 155 // A factory for creating new QuicHttpStreams on top of a pool of | 155 // A factory for creating new QuicHttpStreams on top of a pool of |
| 156 // QuicChromiumClientSessions. | 156 // QuicChromiumClientSessions. |
| 157 class NET_EXPORT_PRIVATE QuicStreamFactory | 157 class NET_EXPORT_PRIVATE QuicStreamFactory |
| 158 : public NetworkChangeNotifier::IPAddressObserver, | 158 : public NetworkChangeNotifier::IPAddressObserver, |
| 159 public NetworkChangeNotifier::NetworkObserver, | 159 public NetworkChangeNotifier::NetworkObserver, |
| 160 public SSLConfigService::Observer, | 160 public SSLConfigService::Observer, |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 578 const scoped_refptr<SSLConfigService> ssl_config_service_; | 578 const scoped_refptr<SSLConfigService> ssl_config_service_; |
| 579 | 579 |
| 580 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; | 580 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; |
| 581 | 581 |
| 582 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); | 582 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); |
| 583 }; | 583 }; |
| 584 | 584 |
| 585 } // namespace net | 585 } // namespace net |
| 586 | 586 |
| 587 #endif // NET_QUIC_CHROMIUM_QUIC_STREAM_FACTORY_H_ | 587 #endif // NET_QUIC_CHROMIUM_QUIC_STREAM_FACTORY_H_ |
| OLD | NEW |