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

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: 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..f453264386f3a0b2eedd4e677afc7c3c6d332290 100644
--- a/chrome/installer/gcapi/gcapi_omaha_experiment.cc
+++ b/chrome/installer/gcapi/gcapi_omaha_experiment.cc
@@ -20,7 +20,10 @@ namespace {
int GetCurrentRlzWeek(const base::Time& current_time) {
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;
}

Powered by Google App Engine
This is Rietveld 408576698