Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

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

Created:
4 years, 7 months ago by estark
Modified:
4 years, 7 months ago
Reviewers:
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@2704
Target Ref:
refs/pending/branch-heads/2704
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 Review-Url: https://codereview.chromium.org/1941073002 Cr-Commit-Position: refs/heads/master@{#391248} (cherry picked from commit c686e3083ac8b46b2b8ce6c036554bf05a7ed9ec) Committed: https://chromium.googlesource.com/chromium/src/+/6ea2ef944984fc750bd1677955bb099a5d5ffeea

Patch Set 1 #

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 3 chunks +70 lines, -4 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
estark
4 years, 7 months ago (2016-05-10 05:50:25 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
6ea2ef944984fc750bd1677955bb099a5d5ffeea.

Powered by Google App Engine
This is Rietveld 408576698