| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/update_client/update_engine.h" | 5 #include "components/update_client/update_engine.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| 11 #include "base/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "components/prefs/pref_service.h" | 13 #include "components/prefs/pref_service.h" |
| 14 #include "components/update_client/action_update_check.h" | 14 #include "components/update_client/action_update_check.h" |
| 15 #include "components/update_client/configurator.h" | 15 #include "components/update_client/configurator.h" |
| 16 #include "components/update_client/crx_update_item.h" | 16 #include "components/update_client/crx_update_item.h" |
| 17 #include "components/update_client/persisted_data.h" | 17 #include "components/update_client/persisted_data.h" |
| 18 #include "components/update_client/update_checker.h" | 18 #include "components/update_client/update_checker.h" |
| 19 | 19 |
| 20 namespace update_client { | 20 namespace update_client { |
| 21 | 21 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 const auto now(base::Time::Now()); | 145 const auto now(base::Time::Now()); |
| 146 | 146 |
| 147 // Throttle the calls in the interval (t - 1 day, t) to limit the effect of | 147 // Throttle the calls in the interval (t - 1 day, t) to limit the effect of |
| 148 // unset clocks or clock drift. | 148 // unset clocks or clock drift. |
| 149 return throttle_updates_until_ - base::TimeDelta::FromDays(1) < now && | 149 return throttle_updates_until_ - base::TimeDelta::FromDays(1) < now && |
| 150 now < throttle_updates_until_; | 150 now < throttle_updates_until_; |
| 151 } | 151 } |
| 152 | 152 |
| 153 } // namespace update_client | 153 } // namespace update_client |
| OLD | NEW |