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

Unified Diff: net/quic/platform/impl/quic_chromium_clock.h

Issue 2547233002: Add a QuicChromiumClock and make QuicClock abstract to match internal code. (Closed)
Patch Set: Created 4 years 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/platform/impl/quic_chromium_clock.h
diff --git a/net/quic/platform/impl/quic_chromium_clock.h b/net/quic/platform/impl/quic_chromium_clock.h
new file mode 100644
index 0000000000000000000000000000000000000000..e703f246cfb5e71beee97b2d51f3043840f111e7
--- /dev/null
+++ b/net/quic/platform/impl/quic_chromium_clock.h
@@ -0,0 +1,31 @@
+// 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.
+
+#ifndef NET_QUIC_PLATFORM_IMPL_QUIC_CHROMIUM_CLOCK_H_
+#define NET_QUIC_PLATFORM_IMPL_QUIC_CHROMIUM_CLOCK_H_
+
+#include "base/time/time.h"
+#include "net/quic/platform/api/quic_clock.h"
+
+namespace net {
+
+// Clock to efficiently retrieve an approximately accurate time from an
+// EpollServer.
+class NET_EXPORT_PRIVATE QuicChromiumClock : public QuicClock {
+ public:
+ QuicChromiumClock();
+ ~QuicChromiumClock() override;
+
+ // QuicClock implementation:
+ QuicTime ApproximateNow() const override;
+ QuicTime Now() const override;
+ QuicWallTime WallNow() const override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(QuicChromiumClock);
+};
+
+} // namespace net
+
+#endif // NET_QUIC_PLATFORM_IMPL_QUIC_CHROMIUM_CLOCK_H_

Powered by Google App Engine
This is Rietveld 408576698