New issue
Advanced search Search tips

Issue 835470 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug
Proj-Servicification

Blocked on:
issue 846873

Blocking:
issue 715695



Sign in to add a comment

Implement DNS cache clearing for the NetworkService

Project Member Reported by mmenke@chromium.org, Apr 20 2018

Issue description

IOThread is going away with the advent of the NetworkService, and this code relies on direct access to the network stack.  All it does is clear the DNS cache, since that's shared between incognito mode and other profiles.  Maybe we can go through browsing data remover instead?  The strange thing is that whoever calls this method has to know that off the record shares a DNS cache with incognito mode (Something that we may want to change, at some point, though shouldn't block the network service on that).
 

Comment 1 by mmenke@chromium.org, Apr 20 2018

Summary: Remove IOThread::ChangedToOnTheRecord (was: Remove IOThread::ChangeToOnTheRecord)
Strangely, it looks to me like BrowsingDataRemover may not even clear the DNS cache.

Comment 2 by mmenke@chromium.org, Apr 21 2018

msramek pointed out that we do clear the DNS cache in ChromeBrowsingDataRemoverDelegate when clearing history, by going through the IOThread.

Comment 3 by dxie@chromium.org, May 15 2018

Owner: mmenke@chromium.org
Status: Assigned (was: Untriaged)
matt, can you comment what the next steps are here?

Comment 4 by mmenke@chromium.org, May 15 2018

Owner: ----
Status: Available (was: Assigned)
I'll defer to whoever tackles the issue (Which may end up being me, time permitting).  I don't think there's any decision too complicated here.

Comment 5 by dxie@chromium.org, May 18 2018

this doesn't seem to be blocking canary.

Comment 6 by mmenke@chromium.org, May 18 2018

Labels: -Pri-3 Proj-Servicification-Canary Pri-1
It does - this is a URLRequestContext access in the browser process, which won't work at all with the network stack out of process.

Comment 7 by mmenke@chromium.org, May 23 2018

Owner: mmenke@chromium.org
Status: Assigned (was: Available)
Summary: Implement DNS cache clearing for the NetworkService (was: Remove IOThread::ChangedToOnTheRecord)
Re-purposing this bug.  Think we'll probably need to have things still directly call into the network service, rather than go through the browsing data remover, unfortunately.
Cc: ericorth@chromium.org
+ericorth@ as a fyi. Eric is investigating dependencies on net/dns outside of //net. He might have covered this cache clearing case.

Comment 9 by mmenke@chromium.org, May 23 2018

In order to get rid of the old pathway entirely, we need to inject ownership of a HostResolver into NetworkService, which I'm pretty sure no one else has investigated (That extra complexity shouldn't be too bad, but it's why I took this)
Blockedon: 846873
Project Member

Comment 11 by bugdroid1@chromium.org, May 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b458879b37cb0addb58f5b57f382cd740c7820f9

commit b458879b37cb0addb58f5b57f382cd740c7820f9
Author: Matt Menke <mmenke@chromium.org>
Date: Wed May 30 22:19:28 2018

NetworkService: Add ClearHostCache() method.

Also make NetworkService object take ownership of the HostResolver
when it's constructed in the legacy in-process path, so that
ChearHostCache() calls in production can go through the NetworkService
API.

Bug:  835470 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: Ic9293aabbc3708ec57823c9a36b992a49bae8f42
Reviewed-on: https://chromium-review.googlesource.com/1070649
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563026}
[modify] https://crrev.com/b458879b37cb0addb58f5b57f382cd740c7820f9/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
[modify] https://crrev.com/b458879b37cb0addb58f5b57f382cd740c7820f9/chrome/browser/io_thread.cc
[modify] https://crrev.com/b458879b37cb0addb58f5b57f382cd740c7820f9/chrome/browser/io_thread.h
[modify] https://crrev.com/b458879b37cb0addb58f5b57f382cd740c7820f9/chrome/browser/profiles/off_the_record_profile_impl.cc
[modify] https://crrev.com/b458879b37cb0addb58f5b57f382cd740c7820f9/chrome/browser/profiles/profile_io_data.cc
[modify] https://crrev.com/b458879b37cb0addb58f5b57f382cd740c7820f9/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/b458879b37cb0addb58f5b57f382cd740c7820f9/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
[modify] https://crrev.com/b458879b37cb0addb58f5b57f382cd740c7820f9/services/network/network_context.cc
[modify] https://crrev.com/b458879b37cb0addb58f5b57f382cd740c7820f9/services/network/network_context.h
[modify] https://crrev.com/b458879b37cb0addb58f5b57f382cd740c7820f9/services/network/network_context_unittest.cc
[modify] https://crrev.com/b458879b37cb0addb58f5b57f382cd740c7820f9/services/network/network_service.cc
[modify] https://crrev.com/b458879b37cb0addb58f5b57f382cd740c7820f9/services/network/network_service.h
[modify] https://crrev.com/b458879b37cb0addb58f5b57f382cd740c7820f9/services/network/public/mojom/network_context.mojom
[modify] https://crrev.com/b458879b37cb0addb58f5b57f382cd740c7820f9/services/network/test/test_network_context.h
[modify] https://crrev.com/b458879b37cb0addb58f5b57f382cd740c7820f9/services/network/url_request_context_builder_mojo.cc
[modify] https://crrev.com/b458879b37cb0addb58f5b57f382cd740c7820f9/services/network/url_request_context_builder_mojo.h
[modify] https://crrev.com/b458879b37cb0addb58f5b57f382cd740c7820f9/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter

Status: Fixed (was: Assigned)

Sign in to add a comment