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

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: Lei Zhang'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: 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..b8b5d9b83e4b016ddd63d3e615158238fc9c5427 100644
--- a/chrome/utility/media_galleries/picasa_album_table_reader.cc
+++ b/chrome/utility/media_galleries/picasa_album_table_reader.cc
@@ -24,7 +24,12 @@ 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;
+ bool conversion_success =
+ base::Time::FromLocalExploded(kPmpVariantTimeEpoch, &out_time);
+ DCHECK(conversion_success);
+
+ return out_time + variant_delta;
}
} // namespace
« no previous file with comments | « chrome/installer/gcapi/gcapi_omaha_experiment.cc ('k') | ios/chrome/browser/ui/webui/history/browsing_history_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698