| 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 <stdint.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 updated packet count at transport layer is available. |
| 48 // |protocol| is the protocol that was used by the watcher. |
| 49 // |num_packets_lost| is the number of packets lost. |
| 50 // |num_packets_received_in_order| is the number of packets received in |
| 51 // order. |num_packets_received_not_in_order| is the number of packets |
| 52 // received out of order. All the counts are since the last call to the |
| 53 // OnUpdatedPacketCountAvailable. This method is called immediately after the |
| 54 // observation is made, hence no timestamp. |
| 55 virtual void OnUpdatedPacketCountAvailable( |
| 56 Protocol protocol, |
| 57 uint64_t num_packets_lost, |
| 58 uint64_t num_packets_received_in_order, |
| 59 uint64_t num_packets_received_not_in_order) = 0; |
| 60 |
| 45 protected: | 61 protected: |
| 46 SocketPerformanceWatcherFactory() {} | 62 SocketPerformanceWatcherFactory() {} |
| 47 | 63 |
| 48 private: | 64 private: |
| 49 DISALLOW_COPY_AND_ASSIGN(SocketPerformanceWatcherFactory); | 65 DISALLOW_COPY_AND_ASSIGN(SocketPerformanceWatcherFactory); |
| 50 }; | 66 }; |
| 51 | 67 |
| 52 } // namespace net | 68 } // namespace net |
| 53 | 69 |
| 54 #endif // NET_BASE_SOCKET_PERFORMANCE_WATCHER_FACTORY_H_ | 70 #endif // NET_BASE_SOCKET_PERFORMANCE_WATCHER_FACTORY_H_ |
| OLD | NEW |