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

Unified Diff: base/time/time.h

Issue 2870223003: Avoid base::Time::FromJavaTime() when not dealing with Java. (Closed)
Patch Set: Created 3 years, 7 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: base/time/time.h
diff --git a/base/time/time.h b/base/time/time.h
index ff8bdde3dc51e30cebc32a4e27c6a229ea79acff..27b00817338eff3012751efb59db27622cfdcd4f 100644
--- a/base/time/time.h
+++ b/base/time/time.h
@@ -492,11 +492,15 @@ class BASE_EXPORT Time : public time_internal::TimeBase<Time> {
// Converts to/from the Javascript convention for times, a number of
// milliseconds since the epoch:
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/getTime.
+ // Consider only using this when dealing with Javascript, and using
miu 2017/05/10 21:43:02 Actually, I'm trying to eliminate all uses of From
+ // FromInternalValue()/ToInternalValue() for serialization.
static Time FromJsTime(double ms_since_epoch);
double ToJsTime() const;
// Converts to/from Java convention for times, a number of
// milliseconds since the epoch.
+ // Consider only using this when dealing with Java, and using
+ // FromInternalValue()/ToInternalValue() for serialization.
static Time FromJavaTime(int64_t ms_since_epoch);
int64_t ToJavaTime() const;

Powered by Google App Engine
This is Rietveld 408576698