New issue
Advanced search Search tips

Issue 817109 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Clearing passwords and/or hosted app data unexpectedly cancels all in-progress downloads

Reported by 93m4qau...@gmail.com, Feb 27 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3356.0 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. Open download-chromium.appspot.com, and begin downloading a copy of Chromium.
2. Open chrome://settings/clearBrowserData.
3. Click the Advanced tab.
4. Uncheck everything, then check Passwords.
5. Click "CLEAR DATA".

1. Open download-chromium.appspot.com, and begin downloading a copy of Chromium.
2. Open chrome://settings/clearBrowserData.
3. Click the Advanced tab.
4. Uncheck everything, then check Hosted app data.
5. Click "CLEAR DATA".

What is the expected behavior?
Since passwords (and likely hosted app data) are completely unrelated to downloads, clearing passwords and/or hosted app data should not unexpectedly cancel in-progress downloads.

What went wrong?
Upon clearing passwords and/or hosted app data, all in-progress downloads are immediately and unexpectedly canceled. On the latest stable (64.0.3282.186), it shows as "Failed - Network disconnected" rather than "Canceled" on canary.

Did this work before? N/A 

Chrome version: 66.0.3356.0  Channel: canary
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

Even clearing download history doesn't cause this problem.
 

Comment 1 by mmenke@chromium.org, Feb 27 2018

Cc: msramek@chromium.org mmenke@chromium.org
Components: -Internals>Network UI>Browser>Passwords Internals>Network>Auth
Clearing passwords clears HTTP authentication credentials, too, so we need to close all sockets, as they may in fact have been created using those credentials.

So this is behaving as expected.  We could consider just flushing the socket pools, so existing connections would go away on complete, but not sure how reliable that is (I'm not sure Authenticated HTTP2 proxy sessions with live requests, for example, would go away on complete), nor if keeping live authenticated sockets is really something we should be doing in this case.  So I think this is probably WontFix, but CCing relevant folks, in case they disagree.


Relevant code:

https://cs.chromium.org/chromium/src/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc?l=839
https://cs.chromium.org/chromium/src/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc?l=261
Components: Privacy
Owner: msramek@chromium.org
Status: Assigned (was: Unconfirmed)
Hmm, with hosted apps data it's probably an actual bug. Hosted apps data means "site data for hosted apps", i.e. local storage et al. for websites which have an associated hosted app in chrome://apps, but not cookies. Cookies are always only deleted with "cookies and site data".

You can see in browsing_data_remover_impl.cc that DATA_TYPE_COOKIE is usually accompanied by ORIGIN_TYPE_UNPROTECTED_WEB (the latter means NOT hosted apps). However, the HTTP auth credentials deletion does not check the latter.

This is a one line fix, but in the longer term, we should probably just make sure that deleting "Hosted apps data" requests a deletion for DATA_TYPE_SITE_DATA & ~DATA_TYPE_COOKIES so that we don't have to check ORIGIN_TYPE.

For passwords, however, I agree that this is working as intended.

Comment 3 by mmenke@chromium.org, Feb 28 2018

Shouldn't we be deleting data from that particularly hosted app's cookie store, and auth cache?
For passwords, even if disrupting active network traffic is intended, wouldn't that warrant a small note or warning upon checking "Passwords" that all network traffic will be disrupted (or only if there is an active upload or download)?

Sign in to add a comment