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

Unified Diff: Source/modules/websockets/MainThreadWebSocketChannel.h

Issue 16049014: Modify MainThreadWebSocketChannel to use enumeration for denotating its current state (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 months 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 | « no previous file | Source/modules/websockets/MainThreadWebSocketChannel.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/websockets/MainThreadWebSocketChannel.h
diff --git a/Source/modules/websockets/MainThreadWebSocketChannel.h b/Source/modules/websockets/MainThreadWebSocketChannel.h
index 8e4ac55edf23182c8c6ccd2166a8597cbcbaa233..1cc1aea6770e5bf6c4c2d27461840175bfa0df6d 100644
--- a/Source/modules/websockets/MainThreadWebSocketChannel.h
+++ b/Source/modules/websockets/MainThreadWebSocketChannel.h
@@ -173,6 +173,12 @@ private:
BlobLoaderFailed
};
+ enum ChannelState {
+ ChannelIdle,
+ ChannelClosing,
+ ChannelClosed
+ };
+
Document* m_document;
WebSocketChannelClient* m_client;
OwnPtr<WebSocketHandshake> m_handshake;
@@ -181,11 +187,10 @@ private:
Timer<MainThreadWebSocketChannel> m_resumeTimer;
bool m_suspended;
- bool m_closing;
bool m_didFailOfClientAlreadyRun;
bool m_receivedClosingHandshake;
Timer<MainThreadWebSocketChannel> m_closingTimer;
- bool m_closed;
+ ChannelState m_state;
bool m_shouldDiscardReceivedData;
unsigned long m_unhandledBufferedAmount;
« no previous file with comments | « no previous file | Source/modules/websockets/MainThreadWebSocketChannel.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698