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

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: rebased Created 4 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: 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..26fc3dd3c1b0e8859f7c532b24cb7913af5299d2 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,14 @@ 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;
+ // |out_time| is set to Time(0) on failure.
+ if (!base::Time::FromUTCExploded(exploded, &out_time)) {
+ // TODO(maksims): implement error handling here.
+ // We might just return |out_time|, which is Time(0).
+ NOTIMPLEMENTED();
+ }
+ return out_time;
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698