Commit 7d6ceb1e authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Stop disabling web usage if closing incognito tabs

It is not necessary to disable web usage when clearing
off-the-record browsing data (as the WebKit bug is not
exercised in that case).

Bug: 821753
Change-Id: I62b011ac182f8e8b7107109a23ac8102da44e574
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Reviewed-on: https://chromium-review.googlesource.com/970466
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544357}
parent c55a5a47
......@@ -2003,10 +2003,17 @@ void MainControllerAuthenticationServiceDelegate::ClearBrowsingData(
timePeriod:(browsing_data::TimePeriod)timePeriod
removeMask:(BrowsingDataRemoveMask)removeMask
completionBlock:(ProceduralBlock)completionBlock {
// TODO(crbug.com/632772): Remove web usage disabling once
// https://bugs.webkit.org/show_bug.cgi?id=149079 has been fixed.
if (IsRemoveDataMaskSet(removeMask,
BrowsingDataRemoveMask::REMOVE_SITE_DATA)) {
// TODO(crbug.com/632772): https://bugs.webkit.org/show_bug.cgi?id=149079
// makes it necessary to disable web usage while clearing browsing data.
// It is however unnecessary for off-the-record BrowserState (as the code
// is not invoked) and has undesired side-effect (cause all regular tabs
// to reload, see http://crbug.com/821753 for details).
const BOOL disableWebUsageDuringRemoval =
!browserState->IsOffTheRecord() &&
IsRemoveDataMaskSet(removeMask, BrowsingDataRemoveMask::REMOVE_SITE_DATA);
if (disableWebUsageDuringRemoval) {
// Disables browsing and purges web views.
// Must be called only on the main thread.
DCHECK([NSThread isMainThread]);
......
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