Migrate chrome/browser/media/router/discovery/discovery_network_monitor.h to NetworkConnectionTracker |
||||||||||
Issue descriptionDiscoveryNetworkMonitor currently uses net::NetworkChangeNotifier to receive network changes. With network service, that will need to be converted to using NetworkConnectionTracker's observer APIs.
,
Jul 26
Copied issue chromium:868001 to issue chromium:868005
,
Jul 30
,
Aug 1
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/014d8e20e192ab28067721d68271760ab80b7d1e commit 014d8e20e192ab28067721d68271760ab80b7d1e Author: Robbie McElrath <rmcelrath@chromium.org> Date: Wed Aug 01 19:28:34 2018 Add NetworkConnectionTracker::AddLeakyNetworkConnectionObserver method. This adds a NetworkConnectionTracker::AddLeakyNetworkConnectionObserver method and makes DialRegistry use it. Prior to this change, every NetworkConnectionTracker observer needed to unregister itself before the NetworkConnectionTracker was deleted, but there are several observers that are leaky singletons. We can't have BrowserProcessImpl call a cleanup method on every leaky singleton since that's horrible, and we can't hook into thread or message loop destruction to do the unregistering because that happens after the NetworkConnectionTracker gets deleted and asserts that everyone has cleaned up. I want to keep the clean up assertion, so I decided to add this AddLeakyNetworkConnectionObserver method, the callers of which will not be expected to unregister themselves before exit. Callers of the AddNetworkConnectionObserver method are still expected to clean up. Bug: 868001 Change-Id: I200d991828d958f8a2849f8d7e031ccb204a0da3 Reviewed-on: https://chromium-review.googlesource.com/1157541 Commit-Queue: Robbie McElrath <rmcelrath@chromium.org> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Cr-Commit-Position: refs/heads/master@{#579898} [modify] https://crrev.com/014d8e20e192ab28067721d68271760ab80b7d1e/chrome/browser/browser_process_impl.cc [modify] https://crrev.com/014d8e20e192ab28067721d68271760ab80b7d1e/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl_unittest.cc [modify] https://crrev.com/014d8e20e192ab28067721d68271760ab80b7d1e/chrome/browser/media/router/discovery/dial/dial_registry.cc [modify] https://crrev.com/014d8e20e192ab28067721d68271760ab80b7d1e/chrome/browser/media/router/discovery/dial/dial_registry.h [modify] https://crrev.com/014d8e20e192ab28067721d68271760ab80b7d1e/chrome/browser/media/router/discovery/dial/dial_registry_unittest.cc [modify] https://crrev.com/014d8e20e192ab28067721d68271760ab80b7d1e/content/public/browser/network_connection_tracker.cc [modify] https://crrev.com/014d8e20e192ab28067721d68271760ab80b7d1e/content/public/browser/network_connection_tracker.h [modify] https://crrev.com/014d8e20e192ab28067721d68271760ab80b7d1e/content/public/browser/network_connection_tracker_unittest.cc
,
Aug 1
,
Aug 7
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/522ff58c1b29d0a5779716a30c12d350cacdab5c commit 522ff58c1b29d0a5779716a30c12d350cacdab5c Author: Robbie McElrath <rmcelrath@chromium.org> Date: Tue Aug 07 04:16:31 2018 Migrate DiscoveryNetworkMonitory to NetworkConnectionTracker This migrates DiscoveryNetworkMonitory from using net::NetworkChangeNotifier to content::NetworkConnectionTracker, which works with the network service enabled. Bug: 868001 Change-Id: Ib8e7e1b766058579dfbc22d885df560a545b6804 Reviewed-on: https://chromium-review.googlesource.com/1147432 Commit-Queue: Robbie McElrath <rmcelrath@chromium.org> Reviewed-by: Derek Cheng <imcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#581130} [modify] https://crrev.com/522ff58c1b29d0a5779716a30c12d350cacdab5c/chrome/browser/media/router/discovery/BUILD.gn [modify] https://crrev.com/522ff58c1b29d0a5779716a30c12d350cacdab5c/chrome/browser/media/router/discovery/discovery_network_monitor.cc [modify] https://crrev.com/522ff58c1b29d0a5779716a30c12d350cacdab5c/chrome/browser/media/router/discovery/discovery_network_monitor.h [modify] https://crrev.com/522ff58c1b29d0a5779716a30c12d350cacdab5c/chrome/browser/media/router/discovery/discovery_network_monitor_unittest.cc [modify] https://crrev.com/522ff58c1b29d0a5779716a30c12d350cacdab5c/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl_unittest.cc
,
Aug 7
,
Aug 17
Reopening because I missed some conversions.
,
Aug 22
,
Aug 24
,
Aug 24
,
Sep 4
,
Sep 5
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/57129d7e9fedc149d6b901aeea8e236bc470457b commit 57129d7e9fedc149d6b901aeea8e236bc470457b Author: Robbie McElrath <rmcelrath@chromium.org> Date: Wed Sep 05 22:58:26 2018 Migrate more of chrome/browser/media/router/discovery off NetworkChangeNotifier There was a call to net::NetworkChangeNotifier::GetConnectionType() that I missed in the intial NetworkChangeNotifier -> NetworkConnectionTracker conversion. This migrates that over. This also makes some changes to ScopedTaskEnvironment and TestBrowserThreadBundle in order to get ScopedTaskEnvironment::MainThreadType::MOCK_TIME working with TestBrowserThreadBundle. Bug: 868001 Change-Id: Ie7d87bdd854ff278a258b26f416c9643b3d4dbcd Reviewed-on: https://chromium-review.googlesource.com/1185887 Commit-Queue: Robbie McElrath <rmcelrath@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Derek Cheng <imcheng@chromium.org> Reviewed-by: Gabriel Charette <gab@chromium.org> Cr-Commit-Position: refs/heads/master@{#589043} [modify] https://crrev.com/57129d7e9fedc149d6b901aeea8e236bc470457b/base/test/scoped_task_environment.cc [modify] https://crrev.com/57129d7e9fedc149d6b901aeea8e236bc470457b/base/test/scoped_task_environment.h [modify] https://crrev.com/57129d7e9fedc149d6b901aeea8e236bc470457b/chrome/browser/media/router/discovery/discovery_network_monitor_metric_observer.cc [modify] https://crrev.com/57129d7e9fedc149d6b901aeea8e236bc470457b/chrome/browser/media/router/discovery/discovery_network_monitor_metric_observer_unittest.cc [modify] https://crrev.com/57129d7e9fedc149d6b901aeea8e236bc470457b/chrome/browser/media/router/discovery/discovery_network_monitor_metrics.h [modify] https://crrev.com/57129d7e9fedc149d6b901aeea8e236bc470457b/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_unittest.cc [modify] https://crrev.com/57129d7e9fedc149d6b901aeea8e236bc470457b/content/public/test/test_browser_thread_bundle.cc [modify] https://crrev.com/57129d7e9fedc149d6b901aeea8e236bc470457b/content/public/test/test_browser_thread_bundle.h
,
Sep 5
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by rmcelrath@chromium.org
, Jul 26