OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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. |
| 4 |
| 5 #include "net/nqe/socket_watcher_factory.h" |
| 6 |
| 7 #include "base/time/time.h" |
| 8 #include "net/nqe/socket_watcher.h" |
| 9 |
| 10 namespace net { |
| 11 |
| 12 namespace nqe { |
| 13 |
| 14 namespace internal { |
| 15 |
| 16 SocketWatcherFactory::SocketWatcherFactory( |
| 17 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| 18 OnUpdatedRTTAvailableCallback updated_rtt_observation_callback) |
| 19 : task_runner_(std::move(task_runner)), |
| 20 updated_rtt_observation_callback_(updated_rtt_observation_callback) {} |
| 21 |
| 22 SocketWatcherFactory::~SocketWatcherFactory() {} |
| 23 |
| 24 std::unique_ptr<SocketPerformanceWatcher> |
| 25 SocketWatcherFactory::CreateSocketPerformanceWatcher(const Protocol protocol) { |
| 26 return std::unique_ptr<SocketPerformanceWatcher>(new SocketWatcher( |
| 27 protocol, task_runner_, updated_rtt_observation_callback_)); |
| 28 } |
| 29 |
| 30 } // namespace internal |
| 31 |
| 32 } // namespace nqe |
| 33 |
| 34 } // namespace net |
OLD | NEW |