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

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

Issue 244923002: UMA: Count the number of WebSocket.send() call for each argument type. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 8 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/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 ba6dd25712e398a0b6627a14ed3d01968fa999b7..ba0c12f193d6b09fe06cbe4fa5f6ccd338ae1003 100644
--- a/Source/modules/websockets/WebSocket.h
+++ b/Source/modules/websockets/WebSocket.h
@@ -163,6 +163,14 @@ private:
Timer<EventQueue> m_resumeTimer;
};
+ enum WebSocketSendType {
+ WebSocketSendTypeString,
+ WebSocketSendTypeArrayBuffer,
+ WebSocketSendTypeArrayBufferView,
+ WebSocketSendTypeBlob,
+ WebSocketSendTypeMax,
+ };
+
explicit WebSocket(ExecutionContext*);
// Adds a console message with JSMessageSource and ErrorMessageLevel.
@@ -175,9 +183,11 @@ private:
size_t getFramingOverhead(size_t payloadSize);
- // Checks the result of WebSocketChannel::send() method, and shows console
- // message and sets ec appropriately.
- void handleSendResult(WebSocketChannel::SendResult, ExceptionState&);
+ // Checks the result of WebSocketChannel::send() method, and:
+ // - shows console message
+ // - sets ExceptionState appropriately
+ // - reports data for UMA.
+ void handleSendResult(WebSocketChannel::SendResult, ExceptionState&, WebSocketSendType);
// Updates m_bufferedAmountAfterClose given the amount of data passed to
// send() method after the state changed to CLOSING or CLOSED.
« no previous file with comments | « no previous file | Source/modules/websockets/WebSocket.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698