Bug 1520617: LauncherRegistryInfo - when the image timestamp changes, only avoid clearing start timestamps when force disabled; r=mhowell

Differential Revision: https://phabricator.services.mozilla.com/D16752

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Aaron Klotz 2019-01-16 22:05:54 +00:00
Родитель 29393c8e79
Коммит 30c3846994
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -338,10 +338,10 @@ LauncherResult<bool> LauncherRegistryInfo::ClearStartTimestamp(
}
LauncherVoidResult LauncherRegistryInfo::ClearStartTimestamps() {
LauncherResult<uint64_t> lastBrowserTimestamp =
GetStartTimestamp(ProcessType::Browser);
if (lastBrowserTimestamp.isOk() && lastBrowserTimestamp.unwrap() == 0ULL) {
// Only proceed when the browser timestamp is non-zero
LauncherResult<EnabledState> enabled = IsEnabled();
if (enabled.isOk() && enabled.unwrap() == EnabledState::ForceDisabled) {
// We don't clear anything when we're force disabled - we need to maintain
// the current registry state in this case.
return Ok();
}