Chromium Code Reviews| Index: chrome/browser/extensions/updater/extension_updater.cc |
| diff --git a/chrome/browser/extensions/updater/extension_updater.cc b/chrome/browser/extensions/updater/extension_updater.cc |
| index 16e57c6690b0a298b2a46dac283c2075bfc960d1..7c27452192f94d4e91e49bb73db83a5a36847993 100644 |
| --- a/chrome/browser/extensions/updater/extension_updater.cc |
| +++ b/chrome/browser/extensions/updater/extension_updater.cc |
| @@ -178,15 +178,14 @@ TimeDelta ExtensionUpdater::DetermineFirstCheckDelay() { |
| return TimeDelta::FromSeconds( |
| RandInt(kStartupWaitSeconds, frequency_seconds_)); |
| + // Read the persisted next check time, and use that if it isn't in the past |
| + // or too far in the future (this can happen with system clock changes). |
| Time saved_next = Time::FromInternalValue(prefs_->GetInt64( |
| pref_names::kNextUpdateCheck)); |
| - |
| Time now = Time::Now(); |
| - |
| - // Read the persisted next check time, and use that if it isn't in the past |
| - // or too far in the future (this can happen with system clock changes). |
| - if (saved_next > now && |
| - saved_next < now + TimeDelta::FromSeconds(frequency_seconds_)) { |
| + base::Time earliest = now + TimeDelta::FromSeconds(1); |
|
lazyboy
2016/12/10 00:10:15
The value 1 is coming from ExtensionUpdater::Sche
asargent_no_longer_on_chrome
2016/12/14 23:01:19
Done.
|
| + base::Time latest = now + TimeDelta::FromSeconds(frequency_seconds_); |
| + if (saved_next > earliest && saved_next < latest) { |
| return saved_next - now; |
| } |