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

Unified Diff: chrome/installer/gcapi/gcapi_omaha_experiment.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/installer/gcapi/gcapi_omaha_experiment.cc
diff --git a/chrome/installer/gcapi/gcapi_omaha_experiment.cc b/chrome/installer/gcapi/gcapi_omaha_experiment.cc
index 5235afd20a9a7d5a91bb68a608d3634f42f3684f..a34a146f83f66c0d05b5c8df86d3d44ef186f095 100644
--- a/chrome/installer/gcapi/gcapi_omaha_experiment.cc
+++ b/chrome/installer/gcapi/gcapi_omaha_experiment.cc
@@ -18,9 +18,12 @@ namespace {
// Returns the number of weeks since 2/3/2003.
int GetCurrentRlzWeek(const base::Time& current_time) {
- base::Time::Exploded february_third_2003_exploded =
+ const base::Time::Exploded february_third_2003_exploded =
{2003, 2, 1, 3, 0, 0, 0, 0};
- base::Time f = base::Time::FromUTCExploded(february_third_2003_exploded);
+ base::Time f;
+ bool conversion_success =
+ base::Time::FromUTCExploded(february_third_2003_exploded, &f);
+ DCHECK(conversion_success);
base::TimeDelta delta = current_time - f;
return delta.InDays() / 7;
}
« no previous file with comments | « chrome/browser/ui/webui/media/webrtc_logs_ui.cc ('k') | chrome/utility/media_galleries/picasa_album_table_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698