| 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_H_ | 5 #ifndef NET_BASE_SOCKET_PERFORMANCE_WATCHER_H_ |
| 6 #define NET_BASE_SOCKET_PERFORMANCE_WATCHER_H_ | 6 #define NET_BASE_SOCKET_PERFORMANCE_WATCHER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "net/base/net_export.h" | 9 #include "net/base/net_export.h" |
| 10 #include "net/base/socket_performance_watcher_factory.h" | 10 #include "net/base/socket_performance_watcher_factory.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 SocketPerformanceWatcherFactory* socket_performance_watcher_factory); | 26 SocketPerformanceWatcherFactory* socket_performance_watcher_factory); |
| 27 | 27 |
| 28 virtual ~SocketPerformanceWatcher(); | 28 virtual ~SocketPerformanceWatcher(); |
| 29 | 29 |
| 30 // Called when updated transport layer RTT information is available. This | 30 // Called when updated transport layer RTT information is available. This |
| 31 // must be the transport layer RTT from this device to the remote transport | 31 // must be the transport layer RTT from this device to the remote transport |
| 32 // layer endpoint. This method is called immediately after the observation is | 32 // layer endpoint. This method is called immediately after the observation is |
| 33 // made, hence no timestamp. | 33 // made, hence no timestamp. |
| 34 void OnUpdatedRTTAvailable(const base::TimeDelta& rtt) const; | 34 void OnUpdatedRTTAvailable(const base::TimeDelta& rtt) const; |
| 35 | 35 |
| 36 // Called when |this| socket performance watcher is reused for establishing a |
| 37 // new transport layer connection. |
| 38 void OnReset() const; |
| 39 |
| 36 private: | 40 private: |
| 37 // Transport layer protocol used by the socket that |this| is watching. | 41 // Transport layer protocol used by the socket that |this| is watching. |
| 38 const SocketPerformanceWatcherFactory::Protocol protocol_; | 42 const SocketPerformanceWatcherFactory::Protocol protocol_; |
| 39 | 43 |
| 40 // |socket_performance_watcher_factory_| is the factory that created | 44 // |socket_performance_watcher_factory_| is the factory that created |
| 41 // |this| watcher. | 45 // |this| watcher. |
| 42 SocketPerformanceWatcherFactory* socket_performance_watcher_factory_; | 46 SocketPerformanceWatcherFactory* socket_performance_watcher_factory_; |
| 43 | 47 |
| 44 DISALLOW_COPY_AND_ASSIGN(SocketPerformanceWatcher); | 48 DISALLOW_COPY_AND_ASSIGN(SocketPerformanceWatcher); |
| 45 }; | 49 }; |
| 46 | 50 |
| 47 } // namespace net | 51 } // namespace net |
| 48 | 52 |
| 49 #endif // NET_BASE_SOCKET_PERFORMANCE_WATCHER_H_ | 53 #endif // NET_BASE_SOCKET_PERFORMANCE_WATCHER_H_ |
| OLD | NEW |