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

Unified Diff: components/update_client/update_engine.cc

Issue 2336913003: Mechanical change of base::Time to base::TimeTicks in the component updater. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « components/update_client/update_engine.h ('k') | components/update_client/url_fetcher_downloader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/update_engine.cc
diff --git a/components/update_client/update_engine.cc b/components/update_client/update_engine.cc
index adb26de1e3b500a9ae6f9dd431e99439d360e3f4..a04898edf6898254ff762018aeb68b2c5aa86e9a 100644
--- a/components/update_client/update_engine.cc
+++ b/components/update_client/update_engine.cc
@@ -128,8 +128,9 @@ void UpdateEngine::UpdateComplete(UpdateContext* update_context, int error) {
if (throttle_sec >= 0)
throttle_updates_until_ =
throttle_sec
- ? base::Time::Now() + base::TimeDelta::FromSeconds(throttle_sec)
- : base::Time();
+ ? base::TimeTicks::Now() +
+ base::TimeDelta::FromSeconds(throttle_sec)
+ : base::TimeTicks();
auto callback = update_context->callback;
@@ -143,7 +144,7 @@ bool UpdateEngine::IsThrottled(bool is_foreground) const {
if (is_foreground || throttle_updates_until_.is_null())
return false;
- const auto now(base::Time::Now());
+ const auto now(base::TimeTicks::Now());
// Throttle the calls in the interval (t - 1 day, t) to limit the effect of
// unset clocks or clock drift.
« no previous file with comments | « components/update_client/update_engine.h ('k') | components/update_client/url_fetcher_downloader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698