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
3 // found in the LICENSE file.
5 #ifndef NET_BASE_SOCKET_PERFORMANCE_WATCHER_FACTORY_H_
6 #define NET_BASE_SOCKET_PERFORMANCE_WATCHER_FACTORY_H_
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "net/base/net_export.h"
16 // SocketPerformanceWatcherFactory creates socket performance watcher for
17 // different type of sockets.
18 class NET_EXPORT_PRIVATE SocketPerformanceWatcherFactory
{
20 virtual ~SocketPerformanceWatcherFactory() {}
22 // Creates a socket performance watcher that will record statistics for a
23 // single TCP socket. Implementations must return a valid, unique
24 // SocketRecorder for every call; recorders must not be shared across calls
25 // or objects, nor is nullptr valid.
26 virtual scoped_ptr
<SocketPerformanceWatcher
>
27 CreateTCPSocketPerformanceWatcher() const = 0;
29 // Creates a socket performance watcher that will record statistics for a
30 // single UDP socket. Implementations must return a valid, unique
31 // SocketRecorder for every call; recorders must not be shared across calls
32 // or objects, nor is nullptr valid.
33 virtual scoped_ptr
<SocketPerformanceWatcher
>
34 CreateUDPSocketPerformanceWatcher() const = 0;
37 SocketPerformanceWatcherFactory() {}
40 DISALLOW_COPY_AND_ASSIGN(SocketPerformanceWatcherFactory
);
45 #endif // NET_BASE_SOCKET_PERFORMANCE_WATCHER_FACTORY_H_