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

Unified Diff: net/quic/quic_time.h

Issue 11961022: Remove default constructors for QuicTime and QuicTime::Delta and used static Zero() methods instead… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/quic_time.h
diff --git a/net/quic/quic_time.h b/net/quic/quic_time.h
index e5ca02a40bff1f9d73e7355ade369179186e248e..a1fb6a382eb47919e2dc1c975f0712aa6645142e 100644
--- a/net/quic/quic_time.h
+++ b/net/quic/quic_time.h
@@ -23,14 +23,14 @@ class NET_EXPORT_PRIVATE QuicTime {
// time, stored in microsecond resolution.
class NET_EXPORT_PRIVATE Delta {
public:
- // Default constructor initializes to 0.
- Delta();
-
explicit Delta(base::TimeDelta delta);
// Create a object with infinite offset time.
static Delta Infinite();
+ // Create a object with infinite offset time.
+ static Delta Zero();
+
// Converts a number of milliseconds to a time offset.
static Delta FromMilliseconds(int64 ms);
@@ -60,11 +60,12 @@ class NET_EXPORT_PRIVATE QuicTime {
friend class QuicTime;
};
- // Default constructor initializes to time 0.
- QuicTime();
-
explicit QuicTime(base::TimeTicks ticks);
+ // Creates a new QuicTime with an internal value of 0. IsInitialized()
+ // will return true for these times.
+ static QuicTime Zero();
+
// Create a new QuicTime holding the time_ms.
static QuicTime FromMilliseconds(int64 time_ms);
« no previous file with comments | « net/quic/quic_http_stream_test.cc ('k') | net/quic/quic_time.cc » ('j') | net/quic/quic_time.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698