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

Issue 2298173002: Implement host-based deletion for the hostname resolution cache. (Closed)

Created:
4 years, 3 months ago by msramek
Modified:
4 years, 3 months ago
CC:
chromium-reviews, markusheintz_, msramek+watch_chromium.org, cbentzel+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement host-based deletion for the hostname resolution cache. To be used by BrowsingDataRemover when the user chooses to delete data for a particular site. This is implemented as a new method HostCache::ClearForHosts() as opposed to extending the existing HostCache::clear(), as clear() has a lot of callsites and thus it seems to be useful to keep this more specific version. On the other hand, the fact that there are many callsites of clear() also means that in many cases it's acceptable to clear the entire cache even if clearing less would be sufficient. In that sense, this CL might be unnecessary and it might be acceptable for BrowsingDataRemover to also clear the entire cache even if the user only needs to delete data for one site. TBR=achuith@chromium.org BUG=589586 Committed: https://crrev.com/94f5656c8278b8a8080f465a97465799b9fd5f7e Cr-Commit-Position: refs/heads/master@{#415664}

Patch Set 1 #

Patch Set 2 : Updated callsite. #

Total comments: 2

Patch Set 3 : Take TimeTicks::Now() out of the loop #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -14 lines) Patch
M chrome/browser/browsing_data/browsing_data_remover.cc View 2 chunks +11 lines, -6 lines 0 comments Download
M chrome/browser/io_thread.h View 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/io_thread.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc View 1 2 chunks +2 lines, -1 line 0 comments Download
M net/dns/host_cache.h View 1 chunk +5 lines, -1 line 0 comments Download
M net/dns/host_cache.cc View 1 2 1 chunk +22 lines, -0 lines 0 comments Download
M net/dns/host_cache_unittest.cc View 3 chunks +42 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (18 generated)
msramek
Hi Matt and Julia, Please have a look! Another small change in the series of ...
4 years, 3 months ago (2016-08-31 15:05:41 UTC) #10
Julia Tuttle
lgtm; it's not super complex and, while the host cache is cleared on network transitions, ...
4 years, 3 months ago (2016-08-31 15:08:51 UTC) #11
mmenke
LGTM as well. If this were any more complicated, I'd say clear() is good enough ...
4 years, 3 months ago (2016-08-31 15:24:37 UTC) #12
msramek
Thank you both! https://codereview.chromium.org/2298173002/diff/20001/net/dns/host_cache.cc File net/dns/host_cache.cc (right): https://codereview.chromium.org/2298173002/diff/20001/net/dns/host_cache.cc#newcode214 net/dns/host_cache.cc:214: RecordErase(ERASE_CLEAR, base::TimeTicks::Now(), it->second); On 2016/08/31 15:24:37, ...
4 years, 3 months ago (2016-08-31 16:02:55 UTC) #15
msramek
Adding +Achuith as TBR for the updated callsite in gaia_screen_handler.cc.
4 years, 3 months ago (2016-08-31 16:04:21 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2298173002/40001
4 years, 3 months ago (2016-08-31 16:05:46 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 3 months ago (2016-08-31 17:09:56 UTC) #24
achuithb
gaia_screen_handler.cc lgtm
4 years, 3 months ago (2016-08-31 17:10:00 UTC) #25
commit-bot: I haz the power
4 years, 3 months ago (2016-08-31 17:12:34 UTC) #27
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/94f5656c8278b8a8080f465a97465799b9fd5f7e
Cr-Commit-Position: refs/heads/master@{#415664}

Powered by Google App Engine
This is Rietveld 408576698