OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef NET_BASE_SOCKET_PERFORMANCE_WATCHER_FACTORY_H_ | 5 #ifndef NET_BASE_SOCKET_PERFORMANCE_WATCHER_FACTORY_H_ |
6 #define NET_BASE_SOCKET_PERFORMANCE_WATCHER_FACTORY_H_ | 6 #define NET_BASE_SOCKET_PERFORMANCE_WATCHER_FACTORY_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
10 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
11 | 13 |
12 namespace base { | 14 namespace base { |
13 class TimeDelta; | 15 class TimeDelta; |
14 } // namespace base | 16 } // namespace base |
15 | 17 |
16 namespace net { | 18 namespace net { |
17 | 19 |
(...skipping 17 matching lines...) Expand all Loading... |
35 const Protocol protocol) = 0; | 37 const Protocol protocol) = 0; |
36 | 38 |
37 // Called when updated transport layer RTT information is available from one | 39 // Called when updated transport layer RTT information is available from one |
38 // of the watchers created by |this|. |protocol| is the protocol that was used | 40 // of the watchers created by |this|. |protocol| is the protocol that was used |
39 // by the watcher. |rtt| must be the transport layer RTT from this device to | 41 // by the watcher. |rtt| must be the transport layer RTT from this device to |
40 // the remote transport layer endpoint. These methods are called immediately | 42 // the remote transport layer endpoint. These methods are called immediately |
41 // after the observation is made, hence no timestamp. | 43 // after the observation is made, hence no timestamp. |
42 virtual void OnUpdatedRTTAvailable(const Protocol protocol, | 44 virtual void OnUpdatedRTTAvailable(const Protocol protocol, |
43 const base::TimeDelta& rtt) = 0; | 45 const base::TimeDelta& rtt) = 0; |
44 | 46 |
| 47 // Called when the incremental packet counts at the transport layer are |
| 48 // available. |protocol| is the protocol that was used by the watcher. All |
| 49 // the counts are since the last call to the |
| 50 // OnIncrementalPacketCountAvailable(). This method is called immediately |
| 51 // after the observation is made, hence no timestamp. |
| 52 virtual void OnIncrementalPacketCountAvailable( |
| 53 Protocol protocol, |
| 54 size_t packets_missing, |
| 55 size_t packets_received_in_order, |
| 56 size_t packets_received_out_of_order) = 0; |
| 57 |
45 protected: | 58 protected: |
46 SocketPerformanceWatcherFactory() {} | 59 SocketPerformanceWatcherFactory() {} |
47 | 60 |
48 private: | 61 private: |
49 DISALLOW_COPY_AND_ASSIGN(SocketPerformanceWatcherFactory); | 62 DISALLOW_COPY_AND_ASSIGN(SocketPerformanceWatcherFactory); |
50 }; | 63 }; |
51 | 64 |
52 } // namespace net | 65 } // namespace net |
53 | 66 |
54 #endif // NET_BASE_SOCKET_PERFORMANCE_WATCHER_FACTORY_H_ | 67 #endif // NET_BASE_SOCKET_PERFORMANCE_WATCHER_FACTORY_H_ |
OLD | NEW |