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

Unified Diff: chrome/utility/media_galleries/picasa_album_table_reader.cc

Issue 2111103002: Make callers of FromUTC(Local)Exploded in chrome/ use new time API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: chrome/utility/media_galleries/picasa_album_table_reader.cc
diff --git a/chrome/utility/media_galleries/picasa_album_table_reader.cc b/chrome/utility/media_galleries/picasa_album_table_reader.cc
index a02b03fed67baf3c0133010df4bb07409f76f2ab..07096d5a4dea41512cc66159501e7c3ff7145d21 100644
--- a/chrome/utility/media_galleries/picasa_album_table_reader.cc
+++ b/chrome/utility/media_galleries/picasa_album_table_reader.cc
@@ -24,7 +24,15 @@ base::Time TimeFromMicrosoftVariantTime(double variant_time) {
base::TimeDelta variant_delta = base::TimeDelta::FromMicroseconds(
static_cast<int64_t>(variant_time * base::Time::kMicrosecondsPerDay));
- return base::Time::FromLocalExploded(kPmpVariantTimeEpoch) + variant_delta;
+ base::Time out_time;
+ if (!base::Time::FromLocalExploded(kPmpVariantTimeEpoch, &out_time)) {
+ // TODO(maksims): implement error handling.
+ // We might just return |out_time|, which is Time(0).
+ NOTIMPLEMENTED();
+ return out_time;
+ }
+
+ return out_time + variant_delta;
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698