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

Side by Side Diff: net/base/socket_performance_watcher_factory.h

Issue 1672513002: Expose packet loss counts from QUIC to NetworkQualityEstimator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed bengr comments, Rebased Created 4 years, 9 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 unified diff | Download patch
OLDNEW
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 #include <stdint.h>
10
8 #include "base/macros.h" 11 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
10 #include "net/base/net_export.h" 13 #include "net/base/net_export.h"
11 14
12 namespace base { 15 namespace base {
13 class TimeDelta; 16 class TimeDelta;
14 } // namespace base 17 } // namespace base
15 18
16 namespace net { 19 namespace net {
17 20
(...skipping 17 matching lines...) Expand all
35 const Protocol protocol) = 0; 38 const Protocol protocol) = 0;
36 39
37 // Called when updated transport layer RTT information is available from one 40 // 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 41 // 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 42 // 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 43 // the remote transport layer endpoint. These methods are called immediately
41 // after the observation is made, hence no timestamp. 44 // after the observation is made, hence no timestamp.
42 virtual void OnUpdatedRTTAvailable(const Protocol protocol, 45 virtual void OnUpdatedRTTAvailable(const Protocol protocol,
43 const base::TimeDelta& rtt) = 0; 46 const base::TimeDelta& rtt) = 0;
44 47
48 // Called when an updated packet count at the transport layer is available.
49 // |protocol| is the protocol that was used by the watcher. All the counts
50 // are since the last call to the OnUpdatedPacketCountAvailable. This method
51 // is called immediately after the observation is made, hence no timestamp.
52 virtual void OnUpdatedPacketCountAvailable(
53 Protocol protocol,
54 size_t packets_lost,
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698