| 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_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| 6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "net/base/completion_callback.h" | 14 #include "net/base/completion_callback.h" |
| 15 #include "net/base/load_states.h" | 15 #include "net/base/load_states.h" |
| 16 #include "net/base/net_export.h" | 16 #include "net/base/net_export.h" |
| 17 #include "net/base/request_priority.h" | 17 #include "net/base/request_priority.h" |
| 18 #include "net/http/http_server_properties.h" | 18 #include "net/http/http_server_properties.h" |
| 19 #include "net/socket/connection_attempts.h" | 19 #include "net/socket/connection_attempts.h" |
| 20 #include "net/ssl/ssl_failure_state.h" |
| 20 // This file can be included from net/http even though | 21 // This file can be included from net/http even though |
| 21 // it is in net/websockets because it doesn't | 22 // it is in net/websockets because it doesn't |
| 22 // introduce any link dependency to net/websockets. | 23 // introduce any link dependency to net/websockets. |
| 23 #include "net/websockets/websocket_handshake_stream_base.h" | 24 #include "net/websockets/websocket_handshake_stream_base.h" |
| 24 | 25 |
| 25 class GURL; | 26 class GURL; |
| 26 | 27 |
| 27 namespace base { | 28 namespace base { |
| 28 class Value; | 29 class Value; |
| 29 } | 30 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // |used_proxy_info| indicates the actual ProxyInfo used for this stream, | 80 // |used_proxy_info| indicates the actual ProxyInfo used for this stream, |
| 80 // since the HttpStreamRequest performs the proxy resolution. | 81 // since the HttpStreamRequest performs the proxy resolution. |
| 81 virtual void OnWebSocketHandshakeStreamReady( | 82 virtual void OnWebSocketHandshakeStreamReady( |
| 82 const SSLConfig& used_ssl_config, | 83 const SSLConfig& used_ssl_config, |
| 83 const ProxyInfo& used_proxy_info, | 84 const ProxyInfo& used_proxy_info, |
| 84 WebSocketHandshakeStreamBase* stream) = 0; | 85 WebSocketHandshakeStreamBase* stream) = 0; |
| 85 | 86 |
| 86 // This is the failure to create a stream case. | 87 // This is the failure to create a stream case. |
| 87 // |used_ssl_config| indicates the actual SSL configuration used for this | 88 // |used_ssl_config| indicates the actual SSL configuration used for this |
| 88 // stream, since the HttpStreamRequest may have modified the configuration | 89 // stream, since the HttpStreamRequest may have modified the configuration |
| 89 // during stream processing. | 90 // during stream processing. If an SSL handshake failed, |ssl_failure_state| |
| 91 // is the state the SSLClientSocket was in. |
| 90 virtual void OnStreamFailed(int status, | 92 virtual void OnStreamFailed(int status, |
| 91 const SSLConfig& used_ssl_config) = 0; | 93 const SSLConfig& used_ssl_config, |
| 94 SSLFailureState ssl_failure_state) = 0; |
| 92 | 95 |
| 93 // Called when we have a certificate error for the request. | 96 // Called when we have a certificate error for the request. |
| 94 // |used_ssl_config| indicates the actual SSL configuration used for this | 97 // |used_ssl_config| indicates the actual SSL configuration used for this |
| 95 // stream, since the HttpStreamRequest may have modified the configuration | 98 // stream, since the HttpStreamRequest may have modified the configuration |
| 96 // during stream processing. | 99 // during stream processing. |
| 97 virtual void OnCertificateError(int status, | 100 virtual void OnCertificateError(int status, |
| 98 const SSLConfig& used_ssl_config, | 101 const SSLConfig& used_ssl_config, |
| 99 const SSLInfo& ssl_info) = 0; | 102 const SSLInfo& ssl_info) = 0; |
| 100 | 103 |
| 101 // This is the failure case where we need proxy authentication during | 104 // This is the failure case where we need proxy authentication during |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 243 |
| 241 private: | 244 private: |
| 242 static bool spdy_enabled_; | 245 static bool spdy_enabled_; |
| 243 | 246 |
| 244 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); | 247 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); |
| 245 }; | 248 }; |
| 246 | 249 |
| 247 } // namespace net | 250 } // namespace net |
| 248 | 251 |
| 249 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ | 252 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| OLD | NEW |