| 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_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ |
| 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <set> | 11 #include <set> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "net/base/host_port_pair.h" | 17 #include "net/base/host_port_pair.h" |
| 18 #include "net/base/net_export.h" | 18 #include "net/base/net_export.h" |
| 19 #include "net/base/request_priority.h" | 19 #include "net/base/request_priority.h" |
| 20 #include "net/http/http_stream_factory.h" | 20 #include "net/http/http_stream_factory.h" |
| 21 #include "net/log/net_log_with_source.h" |
| 21 #include "net/proxy/proxy_server.h" | 22 #include "net/proxy/proxy_server.h" |
| 22 #include "net/socket/ssl_client_socket.h" | 23 #include "net/socket/ssl_client_socket.h" |
| 23 #include "net/spdy/spdy_session_key.h" | 24 #include "net/spdy/spdy_session_key.h" |
| 24 | 25 |
| 25 namespace net { | 26 namespace net { |
| 26 | 27 |
| 27 class HttpNetworkSession; | 28 class HttpNetworkSession; |
| 28 class ProxyInfo; | 29 class ProxyInfo; |
| 29 class SpdySession; | 30 class SpdySession; |
| 30 class NetLogWithSource; | 31 class NetLogWithSource; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 109 |
| 109 // Called when a SpdySession is ready. It will find appropriate Requests and | 110 // Called when a SpdySession is ready. It will find appropriate Requests and |
| 110 // fulfill them. |direct| indicates whether or not |spdy_session| uses a | 111 // fulfill them. |direct| indicates whether or not |spdy_session| uses a |
| 111 // proxy. | 112 // proxy. |
| 112 void OnNewSpdySessionReady(const base::WeakPtr<SpdySession>& spdy_session, | 113 void OnNewSpdySessionReady(const base::WeakPtr<SpdySession>& spdy_session, |
| 113 bool direct, | 114 bool direct, |
| 114 const SSLConfig& used_ssl_config, | 115 const SSLConfig& used_ssl_config, |
| 115 const ProxyInfo& used_proxy_info, | 116 const ProxyInfo& used_proxy_info, |
| 116 bool was_alpn_negotiated, | 117 bool was_alpn_negotiated, |
| 117 NextProto negotiated_protocol, | 118 NextProto negotiated_protocol, |
| 118 bool using_spdy, | 119 bool using_spdy); |
| 119 const NetLogWithSource& net_log); | |
| 120 | 120 |
| 121 // Called when the Job detects that the endpoint indicated by the | 121 // Called when the Job detects that the endpoint indicated by the |
| 122 // Alternate-Protocol does not work. Lets the factory update | 122 // Alternate-Protocol does not work. Lets the factory update |
| 123 // HttpAlternateProtocols with the failure and resets the SPDY session key. | 123 // HttpAlternateProtocols with the failure and resets the SPDY session key. |
| 124 void OnBrokenAlternateProtocol(const Job*, const HostPortPair& origin); | 124 void OnBrokenAlternateProtocol(const Job*, const HostPortPair& origin); |
| 125 | 125 |
| 126 // Called when the Preconnect completes. Used for testing. | 126 // Called when the Preconnect completes. Used for testing. |
| 127 virtual void OnPreconnectsCompleteInternal() {} | 127 virtual void OnPreconnectsCompleteInternal() {} |
| 128 | 128 |
| 129 // Called when the JobController finishes service. Delete the JobController | 129 // Called when the JobController finishes service. Delete the JobController |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 SpdySessionRequestMap spdy_session_request_map_; | 167 SpdySessionRequestMap spdy_session_request_map_; |
| 168 | 168 |
| 169 const bool for_websockets_; | 169 const bool for_websockets_; |
| 170 | 170 |
| 171 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); | 171 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); |
| 172 }; | 172 }; |
| 173 | 173 |
| 174 } // namespace net | 174 } // namespace net |
| 175 | 175 |
| 176 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ | 176 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ |
| OLD | NEW |