commit | ec822aca810e7e5e920cadfbac95ccd5143805b4 | [log] [tgz] |
---|---|---|
author | Ivan Afanasyev <[email protected]> | Tue Sep 05 14:10:06 2017 |
committer | Commit Bot <[email protected]> | Tue Sep 05 14:10:06 2017 |
tree | 6bb16ff8224b702fa422cb6555290938ef88ceba | |
parent | 6b23040f39c99fa96de142c1e67e685e93082128 [diff] [blame] |
fix component updater last check time ComponentUpdateService::MaybeThrottle didn't run properly in the case of it is called until 30 minutes since PC start. The reason is that epoch time of TimeTick class equals to the time of PS startup. Bug: Change-Id: I35832592df8b724f40cdbb96859e0539fbd1a69f Reviewed-on: https://chromium-review.googlesource.com/645954 Reviewed-by: Joshua Pawlicki <[email protected]> Commit-Queue: Joshua Pawlicki <[email protected]> Cr-Commit-Position: refs/heads/master@{#499620}
diff --git a/components/component_updater/component_updater_service.cc b/components/component_updater/component_updater_service.cc index 1242611..a1f8295 100644 --- a/components/component_updater/component_updater_service.cc +++ b/components/component_updater/component_updater_service.cc
@@ -275,7 +275,7 @@ // Check if the request is too soon. const auto* component_state(GetComponentState(id)); - if (component_state) { + if (component_state && !component_state->last_check.is_null()) { base::TimeDelta delta = base::TimeTicks::Now() - component_state->last_check; if (delta < base::TimeDelta::FromSeconds(config_->OnDemandDelay()))