Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(17)

Issue 1941073002: Clear network state only when REMOVE_CACHE is set, not unconditionally (Closed)

Created:
3 years, 6 months ago by estark
Modified:
3 years, 6 months ago
Reviewers:
Mike West
CC:
asanka, chromium-reviews, markusheintz_, msramek+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Clear network state only when REMOVE_CACHE is set, not unconditionally Previously, network state like HSTS data was cleared whenever BrowsingDataRemover::Remove() was called. Some archaeology (https://codereview.chromium.org/7717023/) reveals that the original intention was to clear this state when REMOVE_CACHE was set, but due to a curly brace mishap, we've been clearing it over-aggressively for years. When I changed this behavior to remove network state only when REMOVE_CACHE is set, it revealed that a number of tests are relying on state being asynchronously cleared. This is no longer the case, as for example when only REMOVE_DOWNLOADS is set. This CL fixes that by calling NotifyIfDone() at the end of RemoveImpl(), to catch cases where no state is being wiped asynchronously. This is a little weird since download removal does appear to be async -- but it matches the documentation of BrowsingDataRemover::Observer, which says that the observer fires when "keywords have been deleted, cache cleared and all other tasks scheduled". BUG=603682 Committed: https://crrev.com/c686e3083ac8b46b2b8ce6c036554bf05a7ed9ec Cr-Commit-Position: refs/heads/master@{#391248}

Patch Set 1 #

Patch Set 2 : call GetRequestContext() on main thread #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -12 lines) Patch
M chrome/browser/browsing_data/browsing_data_remover.cc View 3 chunks +11 lines, -8 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_browsertest.cc View 1 3 chunks +70 lines, -4 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
estark
mkwst, PTAL? Also ccing asanka@ who might be able to double-check the new NotifyIfDone() call ...
3 years, 6 months ago (2016-05-02 20:13:18 UTC) #2
Mike West
LGTM, thank you. The `NotifyIfDone()` call makes sense to me; we were relying on callbacks ...
3 years, 6 months ago (2016-05-03 05:17:34 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1941073002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1941073002/20001
3 years, 6 months ago (2016-05-03 15:40:25 UTC) #5
commit-bot: I haz the power
Committed patchset #2 (id:20001)
3 years, 6 months ago (2016-05-03 16:16:20 UTC) #6
commit-bot: I haz the power
3 years, 6 months ago (2016-05-03 16:18:00 UTC) #8
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/c686e3083ac8b46b2b8ce6c036554bf05a7ed9ec
Cr-Commit-Position: refs/heads/master@{#391248}

Powered by Google App Engine
This is Rietveld 408576698