New issue
Advanced search Search tips

Convert consumers of net::NetworkChangeNotifier to NetworkConnectionTracker

Project Member Reported by xunji...@chromium.org, Mar 12 2018

Issue description

As a part of network servicification, we will be converting all interactions with //net C++ APIs to network service's mojo APIs.

content::NetworkConnectionTracker is the mojo counterpart of net::NetworkChangeNotifier. We need to convert all consumers in //chrome and //content to using NetworkConnectionTracker instead of net::NetworkChangeNotifier.



 

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

Labels: -Pri-3 Proj-Servicification-Canary OS-All Pri-1

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

Labels: -OS-All OS-Windows OS-Linux OS-Mac OS-Chrome OS-Android
Blockedon: 859131
Blockedon: 859133
Blockedon: 859134
Blockedon: 859135
Blockedon: 859136
Blockedon: 859138
Blockedon: 859139
Project Member

Comment 10 by bugdroid1@chromium.org, Jul 11

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

commit cec0800c372ef670f59999fb3f028013d36b866c
Author: Helen Li <xunjieli@chromium.org>
Date: Wed Jul 11 20:39:17 2018

Make NetworkConnectionTracker survive network service crashes and restarts

This CL is to mirror tbansal@'s CL
(https://chromium-review.googlesource.com/1058528) to make
NetworkConnectionTracker survice network service's crashes and restarts.

Bug: 821009
Change-Id: Iec33797c0fd0ce12a8e5fdab9fda0a710eb9a528
Reviewed-on: https://chromium-review.googlesource.com/1120738
Commit-Queue: Helen Li <xunjieli@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574314}
[modify] https://crrev.com/cec0800c372ef670f59999fb3f028013d36b866c/chrome/browser/browser_process_impl.cc
[modify] https://crrev.com/cec0800c372ef670f59999fb3f028013d36b866c/chrome/browser/net/network_connection_tracker_browsertest.cc
[modify] https://crrev.com/cec0800c372ef670f59999fb3f028013d36b866c/chrome/browser/net/network_quality_tracker_browsertest.cc
[modify] https://crrev.com/cec0800c372ef670f59999fb3f028013d36b866c/content/public/browser/network_connection_tracker.cc
[modify] https://crrev.com/cec0800c372ef670f59999fb3f028013d36b866c/content/public/browser/network_connection_tracker.h
[modify] https://crrev.com/cec0800c372ef670f59999fb3f028013d36b866c/content/public/browser/network_connection_tracker_unittest.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Jul 12

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

commit 197e9188dc5be69cb34e1ebd67f86a1146439367
Author: Mike West <mkwst@chromium.org>
Date: Thu Jul 12 11:11:00 2018

Revert "Make NetworkConnectionTracker survive network service crashes and restarts"

This reverts commit cec0800c372ef670f59999fb3f028013d36b866c.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified this CL at revision 574314 as the culprit
for introducing flakiness in the tests as shown on:
https://findit-for-me.appspot.com/waterfall/flake/flake-culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyQwsSDEZsYWtlQ3VscHJpdCIxY2hyb21pdW0vY2VjMDgwMGMzNzJlZjY3MGY1OTk5OWZiM2YwMjgwMTNkMzZiODY2Yww

TBR=xunjieli@chromium.org

Bug:  862883 

Original change's description:
> Make NetworkConnectionTracker survive network service crashes and restarts
> 
> This CL is to mirror tbansal@'s CL
> (https://chromium-review.googlesource.com/1058528) to make
> NetworkConnectionTracker survice network service's crashes and restarts.
> 
> Bug: 821009
> Change-Id: Iec33797c0fd0ce12a8e5fdab9fda0a710eb9a528
> Reviewed-on: https://chromium-review.googlesource.com/1120738
> Commit-Queue: Helen Li <xunjieli@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Reviewed-by: Tarun Bansal <tbansal@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#574314}

TBR=jam@chromium.org,xunjieli@chromium.org,tbansal@chromium.org

Change-Id: I2524f0e04441097e06585f4f2e4cdb948a419641
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 821009
Reviewed-on: https://chromium-review.googlesource.com/1135006
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574523}
[modify] https://crrev.com/197e9188dc5be69cb34e1ebd67f86a1146439367/chrome/browser/browser_process_impl.cc
[modify] https://crrev.com/197e9188dc5be69cb34e1ebd67f86a1146439367/chrome/browser/net/network_connection_tracker_browsertest.cc
[modify] https://crrev.com/197e9188dc5be69cb34e1ebd67f86a1146439367/chrome/browser/net/network_quality_tracker_browsertest.cc
[modify] https://crrev.com/197e9188dc5be69cb34e1ebd67f86a1146439367/content/public/browser/network_connection_tracker.cc
[modify] https://crrev.com/197e9188dc5be69cb34e1ebd67f86a1146439367/content/public/browser/network_connection_tracker.h
[modify] https://crrev.com/197e9188dc5be69cb34e1ebd67f86a1146439367/content/public/browser/network_connection_tracker_unittest.cc

Project Member

Comment 12 by bugdroid1@chromium.org, Jul 12

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

commit d24ee7bc5a14573a8a761c45222f68efb4bef3b0
Author: Helen Li <xunjieli@chromium.org>
Date: Thu Jul 12 18:30:30 2018

Reland "Make NetworkConnectionTracker survive network service crashes and restarts"

This reverts commit 197e9188dc5be69cb34e1ebd67f86a1146439367.

Reason for revert: There is a racy test expectation that causes the test to timeout.
This CL fixes the test.

Bug:  862883 , 821009
Change-Id: I1cb4d8db6ea3f5c683f95bcc3187f6c6b4d6fdbd
Reviewed-on: https://chromium-review.googlesource.com/1135290
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Helen Li <xunjieli@chromium.org>
Commit-Queue: Helen Li <xunjieli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574642}
[modify] https://crrev.com/d24ee7bc5a14573a8a761c45222f68efb4bef3b0/chrome/browser/browser_process_impl.cc
[modify] https://crrev.com/d24ee7bc5a14573a8a761c45222f68efb4bef3b0/chrome/browser/net/network_connection_tracker_browsertest.cc
[modify] https://crrev.com/d24ee7bc5a14573a8a761c45222f68efb4bef3b0/chrome/browser/net/network_quality_tracker_browsertest.cc
[modify] https://crrev.com/d24ee7bc5a14573a8a761c45222f68efb4bef3b0/content/public/browser/network_connection_tracker.cc
[modify] https://crrev.com/d24ee7bc5a14573a8a761c45222f68efb4bef3b0/content/public/browser/network_connection_tracker.h
[modify] https://crrev.com/d24ee7bc5a14573a8a761c45222f68efb4bef3b0/content/public/browser/network_connection_tracker_unittest.cc

Blockedon: 868001
Blockedon: 868005
Blockedon: 868007
Blockedon: 868011
Blockedon: 868018
Blockedon: 868021
Blockedon: 868015
Owner: rmcelrath@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 21 by bugdroid1@chromium.org, Jul 30

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

commit 3502b33c2e33ded46f274847bc9cab863f7d0208
Author: Robbie McElrath <rmcelrath@chromium.org>
Date: Mon Jul 30 22:03:17 2018

Migrate chrome/browser/chromeos/policy to NetworkConnectionTracker

This migrates AutoEnrollmentClientImpl and AppInstallEventLoCollector
from using net::NetworkChangeNotifier to
content::NetworkConnectionTracker, which works with the network service
enabled.

Bug: 821009
Change-Id: I33dbd4ab0102d5a55bf34affdb7366b444e842ac
Reviewed-on: https://chromium-review.googlesource.com/1147602
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579187}
[modify] https://crrev.com/3502b33c2e33ded46f274847bc9cab863f7d0208/chrome/browser/chromeos/policy/app_install_event_log_collector.cc
[modify] https://crrev.com/3502b33c2e33ded46f274847bc9cab863f7d0208/chrome/browser/chromeos/policy/app_install_event_log_collector.h
[modify] https://crrev.com/3502b33c2e33ded46f274847bc9cab863f7d0208/chrome/browser/chromeos/policy/app_install_event_log_collector_unittest.cc
[modify] https://crrev.com/3502b33c2e33ded46f274847bc9cab863f7d0208/chrome/browser/chromeos/policy/auto_enrollment_client_impl.cc
[modify] https://crrev.com/3502b33c2e33ded46f274847bc9cab863f7d0208/chrome/browser/chromeos/policy/auto_enrollment_client_impl.h
[modify] https://crrev.com/3502b33c2e33ded46f274847bc9cab863f7d0208/chrome/browser/chromeos/policy/auto_enrollment_client_impl_unittest.cc

Project Member

Comment 22 by bugdroid1@chromium.org, Aug 6

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

commit b797c412ae07e6f88b706be774aa6722cb0f823a
Author: Robbie McElrath <rmcelrath@chromium.org>
Date: Mon Aug 06 22:18:15 2018

Move NetworkConnectionTracker to //services/network/public/cpp

Currently NetworkConnectionTracker is in //content/public/browser,
but it needs to be used by some //components that get used by ios,
which can't depend on //content.

Bug: 821009
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: Id47eda058f5be58492f510771b3ed6e5bbbaffac
Reviewed-on: https://chromium-review.googlesource.com/1162747
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581006}
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/browser_process.h
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/browser_process_impl.cc
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/browser_process_impl.h
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/chromeos/policy/app_install_event_log_collector.h
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/chromeos/policy/app_install_event_log_collector_unittest.cc
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/chromeos/policy/auto_enrollment_client_impl.h
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/intranet_redirect_detector.h
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/media/router/discovery/dial/dial_registry.cc
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/media/router/discovery/dial/dial_registry.h
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/media/webrtc/webrtc_event_log_manager.cc
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/media/webrtc/webrtc_event_log_manager.h
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/media/webrtc/webrtc_event_log_manager_remote.cc
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/media/webrtc/webrtc_event_log_manager_remote.h
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/media/webrtc/webrtc_event_log_manager_unittest.cc
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/net/network_connection_tracker_browsertest.cc
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/printing/cloud_print/privet_traffic_detector.h
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/sessions/tab_loader_delegate.cc
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/signin/chrome_signin_client.h
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/signin/chrome_signin_client_unittest.cc
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/signin/force_signin_verifier.h
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.h
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/browser/sync_file_system/drive_backend/sync_engine.h
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/test/BUILD.gn
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/test/base/testing_browser_process.cc
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/chrome/test/base/testing_browser_process.h
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/content/public/browser/BUILD.gn
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/content/public/common/DEPS
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/content/test/BUILD.gn
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/services/network/BUILD.gn
[modify] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/services/network/public/cpp/BUILD.gn
[rename] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/services/network/public/cpp/network_connection_tracker.cc
[rename] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/services/network/public/cpp/network_connection_tracker.h
[rename] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/services/network/public/cpp/network_connection_tracker_unittest.cc
[rename] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/services/network/test/test_network_connection_tracker.cc
[rename] https://crrev.com/b797c412ae07e6f88b706be774aa6722cb0f823a/services/network/test/test_network_connection_tracker.h

Project Member

Comment 23 by bugdroid1@chromium.org, Aug 8

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

commit f961dc5916a12146d4808d7eaff5192790a31222
Author: Robbie McElrath <rmcelrath@chromium.org>
Date: Wed Aug 08 21:29:26 2018

Move NetworkConnectionTracker getter to network_service_instance.h

The NetworkConnectionTracker instance currently lives in
g_browser_process, but we need the tracker in //content, which can't
access //chrome. This adds a static getter in
network_service_instance.h, which can be used in //content.

Bug: 821009
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: Iaedb89cf2d27f75e0b896d7fd7389ceab3fe4682
Reviewed-on: https://chromium-review.googlesource.com/1162888
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581697}
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/browser_process.h
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/browser_process_impl.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/browser_process_impl.h
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/chromeos/policy/app_install_event_log_collector.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/chromeos/policy/auto_enrollment_client_impl.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/intranet_redirect_detector.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/media/router/discovery/dial/dial_registry.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/media/router/discovery/discovery_network_monitor.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/media/router/discovery/discovery_network_monitor_unittest.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/media/webrtc/webrtc_event_log_manager.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/media/webrtc/webrtc_event_log_manager_unittest.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/net/network_connection_tracker_browsertest.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/printing/cloud_print/privet_traffic_detector.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/sessions/tab_loader_delegate.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/signin/chrome_signin_client.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/signin/chrome_signin_client_unittest.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/signin/force_signin_verifier.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate_unittest.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/test/base/testing_browser_process.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/chrome/test/base/testing_browser_process.h
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/content/browser/network_service_instance.cc
[modify] https://crrev.com/f961dc5916a12146d4808d7eaff5192790a31222/content/public/browser/network_service_instance.h

Labels: -Proj-Servicification-Canary Proj-Servicification
I'm removing the canary blocking label because using NetworkChangeNotifier from outside the network service will work. We should still do these migrations, but they shouldn't block canary.
Labels: hotlist-knon
Labels: Hotlist-KnownIssue
Labels: -Hotlist-KnownIssue
Labels: -hotlist-knon Proj-Servicification-Stable Hotlist-KnownIssue
Blockedon: 883116
Blockedon: 883120
Blockedon: 883121
Blockedon: 883124
Blockedon: 883125
Blockedon: 883126
Labels: -Proj-Servicification-Stable
Blockedon: 887027
Blockedon: 887035
Blockedon: 887037
Blockedon: 887038
Blockedon: 887040
Blockedon: 887043
Blockedon: 887045
Blockedon: 887046
Blockedon: 887047
Blockedon: 887050
Blockedon: 887052
Blockedon: 887054
Blockedon: 887056
Blockedon: 887057
Blockedon: 887058
Cc: juncai@chromium.org

Sign in to add a comment