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

Unified Diff: net/nqe/socket_watcher_factory.cc

Issue 2024813003: Split SocketWatcher and SocketWatcherFactory out of NQE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« net/nqe/socket_watcher_factory.h ('K') | « net/nqe/socket_watcher_factory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/nqe/socket_watcher_factory.cc
diff --git a/net/nqe/socket_watcher_factory.cc b/net/nqe/socket_watcher_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..88fa5a94cb201697bd777efed006cd6f4352f418
--- /dev/null
+++ b/net/nqe/socket_watcher_factory.cc
@@ -0,0 +1,34 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/nqe/socket_watcher_factory.h"
+
+#include "base/time/time.h"
+#include "net/nqe/socket_watcher.h"
+
+namespace net {
+
+namespace nqe {
+
+namespace internal {
+
+SocketWatcherFactory::SocketWatcherFactory(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
+ OnUpdatedRTTAvailableCallback updated_rtt_observation_callback)
+ : task_runner_(std::move(task_runner)),
+ updated_rtt_observation_callback_(updated_rtt_observation_callback) {}
+
+SocketWatcherFactory::~SocketWatcherFactory() {}
+
+std::unique_ptr<SocketPerformanceWatcher>
+SocketWatcherFactory::CreateSocketPerformanceWatcher(const Protocol protocol) {
+ return std::unique_ptr<SocketPerformanceWatcher>(new SocketWatcher(
+ protocol, task_runner_, updated_rtt_observation_callback_));
+}
+
+} // namespace internal
+
+} // namespace nqe
+
+} // namespace net
« net/nqe/socket_watcher_factory.h ('K') | « net/nqe/socket_watcher_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698