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

Unified Diff: components/data_reduction_proxy/core/browser/data_usage_store.cc

Issue 2095553002: Make callers of FromUTC(Local)Exploded in components/ use new time API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fukino's comments Created 4 years, 5 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: components/data_reduction_proxy/core/browser/data_usage_store.cc
diff --git a/components/data_reduction_proxy/core/browser/data_usage_store.cc b/components/data_reduction_proxy/core/browser/data_usage_store.cc
index 220231bfd1d6e48c0303d14d07d53e6a223c1b82..80f4ff2743db48356d6ae01723d205d066cf31d5 100644
--- a/components/data_reduction_proxy/core/browser/data_usage_store.cc
+++ b/components/data_reduction_proxy/core/browser/data_usage_store.cc
@@ -56,7 +56,11 @@ base::Time BucketLowerBoundary(base::Time time) {
exploded.minute -= exploded.minute % kDataUsageBucketLengthInMinutes;
exploded.second = 0;
exploded.millisecond = 0;
- return base::Time::FromUTCExploded(exploded);
+
+ base::Time out_time;
+ bool conversion_success = base::Time::FromUTCExploded(exploded, &out_time);
+ DCHECK(conversion_success);
+ return out_time;
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698