DescriptionClear 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 #
Messages
Total messages: 8 (3 generated)
|