Commit 5a547e6a authored by Nicolas Ouellet-Payeur's avatar Nicolas Ouellet-Payeur Committed by Chromium LUCI CQ

[Downloads] Don't use ScopedProfileKeepAlive for OTR profiles

ScopedProfileKeepAlive is not meant for use with OTR profiles, so this
caused a failed DCHECK() when a downloading a file in Incognito (with
DestroyProfileOnBrowserClose=true).

Bug: 88586
Change-Id: I1aff2cadf62ab1bd56a0b44e9154d6843f92cc89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622873Reviewed-by: default avatarMin Qin <qinmin@chromium.org>
Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842616}
parent c0f17d2d
......@@ -146,9 +146,12 @@ void DownloadStatusUpdater::UpdateProfileKeepAlive(
return;
}
// Are we already holding a keepalive?
Profile* profile = Profile::FromBrowserContext(manager->GetBrowserContext());
DCHECK(profile);
if (profile->IsOffTheRecord())
return;
// Are we already holding a keepalive?
bool already_has_keep_alive =
(profile_keep_alives_.find(profile) != profile_keep_alives_.end());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment