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

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

Issue 27571005: Replace Timers used in ActiveDOMObject with AsyncMethodRunner (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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 | « Source/modules/notifications/Notification.cpp ('k') | Source/modules/websockets/WebSocket.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/websockets/WebSocket.h
diff --git a/Source/modules/websockets/WebSocket.h b/Source/modules/websockets/WebSocket.h
index 773c2ec1b1dfbe9277074d3f29ab9c35b5f26e64..cbda09b4ea09b7fe231ec523e0dd3e9fbed8a713 100644
--- a/Source/modules/websockets/WebSocket.h
+++ b/Source/modules/websockets/WebSocket.h
@@ -38,7 +38,7 @@
#include "core/events/ThreadLocalEventNames.h"
#include "modules/websockets/WebSocketChannel.h"
#include "modules/websockets/WebSocketChannelClient.h"
-#include "platform/Timer.h"
+#include "platform/AsyncMethodRunner.h"
#include "weborigin/KURL.h"
#include "wtf/Forward.h"
#include "wtf/OwnPtr.h"
@@ -126,9 +126,9 @@ private:
// not.
void closeInternal(int, const String&, ExceptionState&);
- // Calls unsetPendingActivity(). Used for m_timerForDeferredDropProtection
- // to drop the reference for protection asynchronously.
- void dropProtection(Timer<WebSocket>*);
+ // Calls unsetPendingActivity(). Used with m_dropProtectionRunner to drop
+ // the reference for protection asynchronously.
+ void dropProtection();
size_t getFramingOverhead(size_t payloadSize);
@@ -160,7 +160,7 @@ private:
// stop() to prevent dispatchEvent() from being called in such handlers.
bool m_stopped;
- Timer<WebSocket> m_timerForDeferredDropProtection;
+ AsyncMethodRunner<WebSocket> m_dropProtectionRunner;
};
} // namespace WebCore
« no previous file with comments | « Source/modules/notifications/Notification.cpp ('k') | Source/modules/websockets/WebSocket.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698