Index: net/websockets/websocket_stream.h |
diff --git a/net/websockets/websocket_stream.h b/net/websockets/websocket_stream.h |
index 46dc526219ea5ef63104e3f609197644ee7f48cf..713205a104dee617dcd3fe117ac9f693bdfa3c5a 100644 |
--- a/net/websockets/websocket_stream.h |
+++ b/net/websockets/websocket_stream.h |
@@ -22,6 +22,10 @@ |
class GURL; |
+namespace base { |
+class Timer; |
+} |
+ |
namespace url { |
class Origin; |
} // namespace url |
@@ -31,6 +35,7 @@ namespace net { |
class BoundNetLog; |
class URLRequestContext; |
struct WebSocketFrame; |
+class WebSocketHandshakeStreamCreateHelper; |
// WebSocketStreamRequest is the caller's handle to the process of creation of a |
// WebSocketStream. Deleting the object before the OnSuccess or OnFailure |
@@ -210,6 +215,20 @@ void WebSocketDispatchOnFinishOpeningHandshake( |
const scoped_refptr<HttpResponseHeaders>& headers, |
base::Time response_time); |
+// Alternate version of WebSocketStream::CreateAndConnectStream() for testing |
+// use only. The differences are the use of a |create_helper| argument in place |
+// of |requested_subprotocols| and taking |timer| as the handshake timeout |
+// timer. Implemented in websocket_stream.cc. |
+NET_EXPORT_PRIVATE scoped_ptr<WebSocketStreamRequest> |
+CreateAndConnectStreamForTesting( |
+ const GURL& socket_url, |
+ scoped_ptr<WebSocketHandshakeStreamCreateHelper> create_helper, |
+ const url::Origin& origin, |
+ URLRequestContext* url_request_context, |
+ const BoundNetLog& net_log, |
+ scoped_ptr<WebSocketStream::ConnectDelegate> connect_delegate, |
+ scoped_ptr<base::Timer> timer); |
+ |
} // namespace net |
#endif // NET_WEBSOCKETS_WEBSOCKET_STREAM_H_ |