Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Unified Diff: net/websockets/websocket_channel.h

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/websockets/README ('k') | net/websockets/websocket_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_channel.h
diff --git a/net/websockets/websocket_channel.h b/net/websockets/websocket_channel.h
index 59e50a1b9655f98ede7e9bda2db904413c20812a..4df6a626ecb6f145cd80291375d607df7dda02ed 100644
--- a/net/websockets/websocket_channel.h
+++ b/net/websockets/websocket_channel.h
@@ -110,6 +110,11 @@ class NET_EXPORT WebSocketChannel {
// set it to a very small value for testing purposes.
void SetClosingHandshakeTimeoutForTesting(base::TimeDelta delay);
+ // The default timout for the underlying connection close is a sensible value
+ // (see kUnderlyingConnectionCloseTimeoutSeconds in websocket_channel.cc).
+ // However, we can set it to a very small value for testing purposes.
+ void SetUnderlyingConnectionCloseTimeoutForTesting(base::TimeDelta delay);
+
// Called when the stream starts the WebSocket Opening Handshake.
// This method is public for testing.
void OnStartOpeningHandshake(
@@ -371,10 +376,14 @@ class NET_EXPORT WebSocketChannel {
uint64 current_receive_quota_;
// Timer for the closing handshake.
- base::OneShotTimer<WebSocketChannel> timer_;
+ base::OneShotTimer<WebSocketChannel> close_timer_;
// Timeout for the closing handshake.
- base::TimeDelta timeout_;
+ base::TimeDelta closing_handshake_timeout_;
+
+ // Timeout for the underlying connection close after completion of closing
+ // handshake.
+ base::TimeDelta underlying_connection_close_timeout_;
// Storage for the status code and reason from the time the Close frame
// arrives until the connection is closed and they are passed to
« no previous file with comments | « net/websockets/README ('k') | net/websockets/websocket_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698