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

Unified Diff: net/nqe/socket_watcher_factory.cc

Issue 2690113004: Throttle Socket watcher RTT notifications from QUIC (Closed)
Patch Set: ps Created 3 years, 10 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
Index: net/nqe/socket_watcher_factory.cc
diff --git a/net/nqe/socket_watcher_factory.cc b/net/nqe/socket_watcher_factory.cc
index 88fa5a94cb201697bd777efed006cd6f4352f418..6c4b0877397f23243f182de1ae93d7601ef02b46 100644
--- a/net/nqe/socket_watcher_factory.cc
+++ b/net/nqe/socket_watcher_factory.cc
@@ -15,16 +15,19 @@ namespace internal {
SocketWatcherFactory::SocketWatcherFactory(
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
+ base::TimeDelta min_notification_interval,
OnUpdatedRTTAvailableCallback updated_rtt_observation_callback)
: task_runner_(std::move(task_runner)),
+ min_notification_interval_(min_notification_interval),
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_));
+ return std::unique_ptr<SocketPerformanceWatcher>(
RyanSturm 2017/02/15 17:42:08 change this to make_unique while you're here.
tbansal1 2017/02/15 20:37:42 Done.
+ new SocketWatcher(protocol, min_notification_interval_, task_runner_,
+ updated_rtt_observation_callback_));
}
} // namespace internal

Powered by Google App Engine
This is Rietveld 408576698