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

Unified Diff: net/quic/quic_time.cc

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
« no previous file with comments | « net/quic/quic_time.h ('k') | net/quic/quic_time_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_time.cc
diff --git a/net/quic/quic_time.cc b/net/quic/quic_time.cc
index b0d6434ee3c3386249d6e02805c951ef16668f5b..68ea6aaa3d568d4943506f13ea0181ccf6744e9a 100644
--- a/net/quic/quic_time.cc
+++ b/net/quic/quic_time.cc
@@ -11,12 +11,12 @@ namespace net {
// Highest number of microseconds that DateTimeOffset can hold.
const int64 kQuicInfiniteTimeUs = GG_INT64_C(0x7fffffffffffffff) / 10;
-QuicTime::Delta::Delta()
- : delta_(base::TimeDelta::FromMicroseconds(0)) {
+QuicTime::Delta::Delta(base::TimeDelta delta_)
jar (doing other things) 2013/01/17 01:50:33 nit: use an arg name without the trailing undersco
Ryan Hamilton 2013/01/17 18:44:18 Done.
+ : delta_(delta_) {
}
-QuicTime::Delta::Delta(base::TimeDelta delta)
- : delta_(delta) {
+QuicTime::Delta QuicTime::Delta::Zero() {
+ return QuicTime::Delta::FromMicroseconds(0);
}
QuicTime::Delta QuicTime::Delta::Infinite() {
@@ -61,8 +61,9 @@ QuicTime::Delta QuicTime::Delta::Subtract(const Delta& delta) const {
delta.ToMicroseconds());
}
-
-QuicTime::QuicTime() {
+// static
+QuicTime QuicTime::Zero() {
+ return QuicTime::FromMilliseconds(0);
}
QuicTime::QuicTime(base::TimeTicks ticks)
« no previous file with comments | « net/quic/quic_time.h ('k') | net/quic/quic_time_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698