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

Unified Diff: third_party/WebKit/Source/platform/wtf/Time.h

Issue 2928833002: [CacheStorage] [DevTools] Added "Time Received" column to cache storage data grid (Closed)
Patch Set: Removed timestamp from tests Created 3 years, 6 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: third_party/WebKit/Source/platform/wtf/Time.h
diff --git a/third_party/WebKit/Source/platform/wtf/Time.h b/third_party/WebKit/Source/platform/wtf/Time.h
index 357004c8b242e50bdd4929a21a00ff7124dfc155..3c8c9035da319b2105c8c53b4c7790f733bc9b73 100644
--- a/third_party/WebKit/Source/platform/wtf/Time.h
+++ b/third_party/WebKit/Source/platform/wtf/Time.h
@@ -40,6 +40,8 @@ class TimeWrapper {
int64_t ToInternalValueForTesting() const { return value_.ToInternalValue(); }
+ time_t ToDoubleT() const { return value_.ToDoubleT(); }
Yuta Kitamura 2017/06/09 06:26:03 WTF::Time is now an alias of base::Time (see line
kristipark 2017/06/09 17:37:13 You are correct, thanks for pointing that out. Rem
+
// Only use this conversion when interfacing with legacy code that represents
// time in double. Converting to double can lead to losing information for
// large time values.
@@ -49,6 +51,10 @@ class TimeWrapper {
return WrappedTimeType() + TimeDelta::FromSecondsD(seconds);
}
+ static TimeWrapper FromInternalValue(int64_t us) {
+ return Time::FromInternalValue(us);
+ }
+
TimeWrapper& operator=(TimeWrapper other) {
value_ = other.value_;
return *this;

Powered by Google App Engine
This is Rietveld 408576698