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

Unified Diff: base/time/time.cc

Issue 2542203002: [Android History] Add Android history manager UI and bridge (Closed)
Patch Set: Add OWNERS files 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: base/time/time.cc
diff --git a/base/time/time.cc b/base/time/time.cc
index 4e942015fcf578015138c7a824ea65ac6b416b8c..ba129954235f2c82db3f67ea4816540d87783ce8 100644
--- a/base/time/time.cc
+++ b/base/time/time.cc
@@ -203,6 +203,11 @@ double Time::ToJsTime() const {
kMicrosecondsPerMillisecond);
}
+Time Time::FromJavaTime(int64_t ms_since_epoch) {
+ return base::Time::UnixEpoch() +
+ base::TimeDelta::FromMilliseconds(ms_since_epoch);
+}
+
int64_t Time::ToJavaTime() const {
if (is_null()) {
// Preserve 0 so the invalid result doesn't depend on the platform.

Powered by Google App Engine
This is Rietveld 408576698