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

Unified Diff: net/quic/core/congestion_control/simulation/actor.cc

Issue 2322233004: Landing Recent QUIC changes until Sun Sep 4 03:41:00 (Closed)
Patch Set: Remove simulation files from the build. Created 4 years, 3 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/quic/core/congestion_control/simulation/actor.cc
diff --git a/net/quic/core/congestion_control/simulation/actor.cc b/net/quic/core/congestion_control/simulation/actor.cc
new file mode 100644
index 0000000000000000000000000000000000000000..fba9218bd203ed29f12b55d144c223a258130833
--- /dev/null
+++ b/net/quic/core/congestion_control/simulation/actor.cc
@@ -0,0 +1,29 @@
+// Copyright (c) 2012 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/quic/core/congestion_control/simulation/actor.h"
+#include "net/quic/core/congestion_control/simulation/simulator.h"
+
+namespace net {
+namespace simulation {
+
+Actor::Actor(Simulator* simulator, std::string name)
+ : simulator_(simulator),
+ clock_(simulator->GetClock()),
+ name_(std::move(name)) {
+ simulator->AddActor(this);
+}
+
+Actor::~Actor() {}
+
+void Actor::Schedule(QuicTime next_tick) {
+ simulator_->Schedule(this, next_tick);
+}
+
+void Actor::Unschedule() {
+ simulator_->Unschedule(this);
+}
+
+} // namespace simulation
+} // namespace net
« no previous file with comments | « net/quic/core/congestion_control/simulation/actor.h ('k') | net/quic/core/congestion_control/simulation/alarm_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698