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

Unified Diff: net/disk_cache/blockfile/eviction.cc

Issue 2090713003: Make callers of FromUTC(Local)Exploded in net/ use new time API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove redundant line 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: net/disk_cache/blockfile/eviction.cc
diff --git a/net/disk_cache/blockfile/eviction.cc b/net/disk_cache/blockfile/eviction.cc
index 52fca5fb7d0254ca1c0194bfd8a3268e9e48310e..68f65b4bdcbe434b7fffeb13f0d3376727003225 100644
--- a/net/disk_cache/blockfile/eviction.cc
+++ b/net/disk_cache/blockfile/eviction.cc
@@ -275,12 +275,10 @@ void Eviction::ReportTrimTimes(EntryImpl* entry) {
backend_->FirstEviction();
} else {
// This is an old file, but we may want more reports from this user so
- // lets save some create_time.
- Time::Exploded old = {0};
- old.year = 2009;
- old.month = 3;
- old.day_of_month = 1;
- header_->create_time = Time::FromLocalExploded(old).ToInternalValue();
+ // lets save some create_time. Conversion cannot fail here.
+ const base::Time time_2009_3_1 =
+ base::Time::FromInternalValue(12985574400000000);
+ header_->create_time = time_2009_3_1.ToInternalValue();
}
}
}

Powered by Google App Engine
This is Rietveld 408576698