OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Collect metrics of SocketStream usage. | 5 // Collect metrics of SocketStream usage. |
6 // TODO(ukai): collect WebSocket specific metrics (e.g. handshake time, etc). | 6 // TODO(ukai): collect WebSocket specific metrics (e.g. handshake time, etc). |
7 | 7 |
8 #ifndef NET_SOCKET_STREAM_SOCKET_STREAM_METRICS_H_ | 8 #ifndef NET_SOCKET_STREAM_SOCKET_STREAM_METRICS_H_ |
9 #define NET_SOCKET_STREAM_SOCKET_STREAM_METRICS_H_ | 9 #define NET_SOCKET_STREAM_SOCKET_STREAM_METRICS_H_ |
10 #pragma once | 10 #pragma once |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "net/base/net_api.h" | 14 #include "net/base/net_export.h" |
15 | 15 |
16 class GURL; | 16 class GURL; |
17 | 17 |
18 namespace net { | 18 namespace net { |
19 | 19 |
20 class NET_TEST SocketStreamMetrics { | 20 class NET_EXPORT_PRIVATE SocketStreamMetrics { |
21 public: | 21 public: |
22 enum ProtocolType { | 22 enum ProtocolType { |
23 PROTOCOL_UNKNOWN, | 23 PROTOCOL_UNKNOWN, |
24 PROTOCOL_WEBSOCKET, | 24 PROTOCOL_WEBSOCKET, |
25 PROTOCOL_WEBSOCKET_SECURE, | 25 PROTOCOL_WEBSOCKET_SECURE, |
26 NUM_PROTOCOL_TYPES, | 26 NUM_PROTOCOL_TYPES, |
27 }; | 27 }; |
28 | 28 |
29 enum ConnectionType { | 29 enum ConnectionType { |
30 CONNECTION_NONE, | 30 CONNECTION_NONE, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 int received_counts_; | 62 int received_counts_; |
63 int sent_bytes_; | 63 int sent_bytes_; |
64 int sent_counts_; | 64 int sent_counts_; |
65 | 65 |
66 DISALLOW_COPY_AND_ASSIGN(SocketStreamMetrics); | 66 DISALLOW_COPY_AND_ASSIGN(SocketStreamMetrics); |
67 }; | 67 }; |
68 | 68 |
69 } // namespace net | 69 } // namespace net |
70 | 70 |
71 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_METRICS_H_ | 71 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_METRICS_H_ |
OLD | NEW |