New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 882610 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 21
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug
Proj-Servicification

Blocking:
issue 827532



Sign in to add a comment

Implement NetworkChangeNotifier on ChromeOS

Project Member Reported by chongz@chromium.org, Sep 10

Issue description

There is a substantial amount of browser tests failing due to the following check (1626 text matches in a full run[1]):
```
ERROR:network_service.cc(84)] Not implemented reached in std::unique_ptr<net::NetworkChangeNotifier> network::(anonymous namespace)::CreateNetworkChangeNotifierIfNeeded()
```

 issue 754709  added NetworkChangeNotifier functionalities to network service on most desktop platforms but not Chrome OS.

As mentioned in the TODO[1] we should figure what we want to do here.

[1] https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8936112189321635792/+/steps/browser_tests__with_patch_/0/stdout
[2] https://cs.chromium.org/chromium/src/services/network/network_service.cc?l=84&rcl=4c8d038112ca80e0f63885273c3e9ffc5d54ea72

 
More details: Tests usually fail with one of the error log below:

Log Type 1:
```
[2380:2393:0906/111643.935965:ERROR:network_service.cc(84)] Not implemented reached in std::unique_ptr<net::NetworkChangeNotifier> network::(anonymous namespace)::CreateNetworkChangeNotifierIfNeeded()
[2300:2300:0906/111643.975157:INFO:remote_commands_service.cc(38)] Fetching remote commands.
[2300:2300:0906/111643.992077:WARNING:remote_commands_service.cc(40)] Client is not registered.
[2300:2300:0906/111643.993726:INFO:remote_commands_invalidator.cc(32)] Initialize RemoteCommandsInvalidator.
[2300:2300:0906/111643.993776:INFO:remote_commands_invalidator.cc(57)] Starting RemoteCommandsInvalidator.
[2300:2300:0906/111643.993796:INFO:remote_commands_invalidator.cc(123)] RemoteCommandsInvalidator ReloadPolicyData.
[2300:2300:0906/111643.993830:INFO:remote_commands_invalidator.cc(167)] Unregister RemoteCommandsInvalidator.
[2300:2300:0906/111644.109479:ERROR:network_profile_handler.cc(83)] Manager properties returned from Shill don't contain the field Profiles
[2300:2300:0906/111644.109558:ERROR:network_sms_handler.cc(436)] NetworkSmsHandler: No list value for: Devices
[2300:2300:0906/111644.221522:ERROR:content_gpu_interface_provider.cc(83)] Not implemented reached in virtual void ash::ContentGpuInterfaceProvider::RegisterOzoneGpuInterfaces(service_manager::BinderRegistry *)
[2300:2300:0906/111644.241151:WARNING:shelf_button.cc(381)] An icon of size 32x32is being scaled up and will look blurry.
[2300:2300:0906/111644.321393:ERROR:arc_active_directory_enrollment_token_fetcher.cc(161)] Fetching an enrollment token failed. DM Status: 5
```

Log Type 2:
```
[7107:7120:0906/111709.536661:ERROR:network_service.cc(84)] Not implemented reached in std::unique_ptr<net::NetworkChangeNotifier> network::(anonymous namespace)::CreateNetworkChangeNotifierIfNeeded()
[7074:7074:0906/111709.562506:INFO:remote_commands_service.cc(38)] Fetching remote commands.
[7074:7074:0906/111709.579961:WARNING:remote_commands_service.cc(40)] Client is not registered.
[7074:7074:0906/111709.580093:INFO:remote_commands_invalidator.cc(32)] Initialize RemoteCommandsInvalidator.
[7074:7074:0906/111709.581531:INFO:remote_commands_invalidator.cc(57)] Starting RemoteCommandsInvalidator.
[7074:7074:0906/111709.581578:INFO:remote_commands_invalidator.cc(123)] RemoteCommandsInvalidator ReloadPolicyData.
[7074:7074:0906/111709.581598:INFO:remote_commands_invalidator.cc(167)] Unregister RemoteCommandsInvalidator.
[7074:7074:0906/111709.704561:ERROR:network_type_pattern.cc(134)] NetworkTypePattern: wifi: Can not match empty type.
[7074:7074:0906/111709.705999:ERROR:network_type_pattern.cc(134)] NetworkTypePattern: wifi: Can not match empty type.
[7074:7074:0906/111709.706009:ERROR:network_type_pattern.cc(134)] NetworkTypePattern: wifi: Can not match empty type.
[7074:7074:0906/111709.706058:ERROR:network_type_pattern.cc(134)] NetworkTypePattern: wifi: Can not match empty type.
[7074:7074:0906/111709.706064:ERROR:network_type_pattern.cc(134)] NetworkTypePattern: wifi: Can not match empty type.
[7074:7074:0906/111709.706070:ERROR:network_type_pattern.cc(134)] NetworkTypePattern: wifi: Can not match empty type.
[7074:7074:0906/111709.706097:ERROR:network_type_pattern.cc(134)] NetworkTypePattern: wifi: Can not match empty type.
[7074:7074:0906/111709.706103:ERROR:network_type_pattern.cc(134)] NetworkTypePattern: wifi: Can not match empty type.
[7074:7074:0906/111709.706109:ERROR:network_type_pattern.cc(134)] NetworkTypePattern: wifi: Can not match empty type.
[7074:7074:0906/111709.706169:ERROR:network_type_pattern.cc(134)] NetworkTypePattern: wifi: Can not match empty type.
[7074:7074:0906/111709.706176:ERROR:network_type_pattern.cc(134)] NetworkTypePattern: wifi: Can not match empty type.
[7074:7074:0906/111709.706182:ERROR:network_type_pattern.cc(134)] NetworkTypePattern: wifi: Can not match empty type.
[7074:7074:0906/111709.804834:ERROR:content_gpu_interface_provider.cc(83)] Not implemented reached in virtual void ash::ContentGpuInterfaceProvider::RegisterOzoneGpuInterfaces(service_manager::BinderRegistry *)
```

Will investigate whether `ash::ContentGpuInterfaceProvider::RegisterOzoneGpuInterfaces()` has anything to do with the issue.

Cc: steve...@chromium.org
+stevenjb@ (OWNER of //src/chromeos/network/): Can I have some insights on how I should make |NetworkChangeNotifier| work with Network Service on ChromeOS?

My naive thinking is we probably want to call |NetworkChangeNotifierFactoryChromeos::CreateInstance()| in |NetworkChangeNotifier::Create()|[1], but my guts tell me it won't be that easy (otherwise it would already be done).

One observation is that we are calling
```
net::NetworkChangeNotifier::SetFactory(
      new NetworkChangeNotifierFactoryChromeos());
```
in |ChromeBrowserMainPartsChromeos::PreMainMessageLoopStart()|, which would then be picked up by |NetworkChangeNotifier::Create()| and should explain why it works without Network Service. So I'm also wondering maybe I should do something similarly to override the factory in the Network Service process, assuming there are some timing issues involved?

Thanks!

[1] https://cs.chromium.org/chromium/src/net/base/network_change_notifier.cc?l=206&rcl=a9c4e1d4481e67dbfc550c19b04252a8839fa35d

I'm not super familiar with NetworkChangeNotifier, but unfortunately the original authors have moved on.

As you noted, we override the factory in ChromeBrowserMainPartsChromeos::PreMainMessageLoopStart(). It is unclear to me why that wouldn't get called on browser_tests?

Re #c3: Sorry for the confusion. The background is '/net' code (e.g. |NetworkChangeNotifier::Create()|) would run in a stand along process (Network Service process), thus the override in the browser process won't work.

Sorry to hear that the original authors have moved on. I will do some experiments by myself then, but still it would be really helpful if I could get some input on how Chrome OS is different from other platforms on this issue though (e.g. Why do we have to override the factory instead of returning it directly).

Thanks!

I have not investigated the problem, but there's a whole bunch of parallel network infrastructure used by a bunch of ChromeOS network classes (Not just the NCN).  chromeos/network/network_state_handler.* is one of the primary classes of that infrastructure, I believe.  Some consumers of that stuff will need to go in the network service, some not, I believe.  So it seems like the choices are either to move that stuff into the network service, or add a bunch of APIs so it could live outside the network service, but inform the network service of state changes.

I haven't looked into this (deliberately), so don't really have an opinion on what should be done about this stuff.
I will probably need to take a closer look at NetworkChangeNotifier myself, but scanning through NetworkChangeNotifierChromeos, I see that it is built on top of NetworkStateHandler, which wraps a DBus interface between Chrome and Shill (the connection manager process running on Chrome OS).

The problem is that Shill does not really support multiple clients, so having a separate process implementing NetworkStateHandler is a problem.

There are plans to create a mojo interface providing the functionality of NetworkStateHandler. I think that migrating NCNChromeos to use that interface and moving it to src/net is the correct long term solution.

Unfortunately that effort is not currently at the top of my priority list, as much as I would like it to be. I do hope to complete it by the end of Q4. If that is not soon enough, you may need to create a simpler bridge between Chrome and NetworkService.

Tracking issue for cros_network_config.mojom: issue 862420
Thanks mmenke@ and stevenjb@ for the additional background! It feels like we are having some dependency issues here, will dig into it and see what I can do.

> The problem is that Shill does not really support multiple clients, so having a separate process implementing NetworkStateHandler is a problem.

Just to clarify: Can I assume that Shill handles not only network but also other system functionalities. Which means we cannot move Shill entirely to the network service process since the browser process also has to access it.

> Tracking issue for cros_network_config.mojom: issue 862420

IIUC the plan was to still host network implementation in the browser process, and expose a set of mojo APIs (e.g. To the network service process). It feels to me that we're essentially adding an additional process hop to all network requests, which is no better than hosting network service in-process...

Will look into it anyway to see if I'm missing something.

Shill is a separate process. It's the Chrome OS version of Linux's conman.

NetworkStateHandler is used to configure network connections (by sending DBus messages to Shill) and reflect connection state (e.g. what wifi networks are visible, what networks are connected/connecting, etc). It is separate from the "network service" implementation in src/net.

Currently UI in src/chrome and src/ash is deeply integrated with NetworkStateHandler. Mid-term we are planning to convert src/ash to use the new mojo service and have the Chrome process host the cros_network_config mojo service. In theory we could migrate all of src/chrome to use the mojo service as well and move the service to the NetworkService process, but that would be a lot more work.

Re #c9: Got it, thanks for the detailed explanations! I will try to figure out a possible near term solution and get back if I got more questions.

Status: Assigned (was: Started)
Actually the error log in #c1 doesn't seem to cause test failures. Will work on  issue 884773  first which seem to be more related, and get back to this one later.
Labels: Hotlist-KnownIssue
Project Member

Comment 13 by bugdroid1@chromium.org, Sep 20

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

commit c625b2d97a6a8d52c400fdff08f024d3c3d71575
Author: Chong Zhang <chongz@chromium.org>
Date: Thu Sep 20 22:53:11 2018

Update test filter mojo.fyi.chromeos.network_browser_tests.filter

ChromeBrowserMainBrowserTest.VariationsServiceStartsRequestOnNetworkChange
was renamed and started failing since:
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mojo%20ChromiumOS/35102

TBR=jam@chromium.org

Bug:  882610 
Change-Id: I7caef8a59d7447d8d2420c6cff13f93e68311c1b
Reviewed-on: https://chromium-review.googlesource.com/1236284
Reviewed-by: Chong Zhang <chongz@chromium.org>
Commit-Queue: Chong Zhang <chongz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592983}
[modify] https://crrev.com/c625b2d97a6a8d52c400fdff08f024d3c3d71575/testing/buildbot/filters/mojo.fyi.chromeos.network_browser_tests.filter

Labels: Proj-Servicification-Canary
Cc: chongz@chromium.org kinuko@chromium.org
 Issue 889246  has been merged into this issue.
Cc: -kinuko@chromium.org rmcelrath@chromium.org
Owner: ----
Status: Available (was: Assigned)
Marking as available so others could pick up.
Owner: rmcelrath@chromium.org
Status: Assigned (was: Available)
Status: Started (was: Assigned)
Project Member

Comment 19 by bugdroid1@chromium.org, Nov 9

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

commit 7b0677dd5848ec9f489652d899188731404defea
Author: Robbie McElrath <rmcelrath@chromium.org>
Date: Fri Nov 09 00:38:36 2018

Get NetworkChangeNotifier working on ChromeOS with network service.

The current NetworkChangeNotifierChromeOS implementation won't work
with the network service enabled because it listens for network changes
from Shill, which only supports a single client. The browser process
has other dependencies on Shill, so it has to be the client for the time
being, meaning the network service can't directly listen for network
changes and has to be notified of them from the browser process.

This CL splits the NetworkChangeNotifierChromeOS into two parts;
the first will live in the browser process and listen to Shill, while
the second is the actual NetworkChangeNotifierChromeOS implementation
which will have an instance in both the browser and network processes.
Since NetworkChangeNotifierChromeOS can't actually listen for network
changes itself, it just gets notified of changes from part 1 via a new
method in NetworkChangeManager. When the thing listening to Shill sees
a network change, it notifies its local NetworkChangeNotifierChromeOS
instance, and calls the new NetworkChangeManager method, the
implementation of which then notifies the network service's
NetworkChangeNotifierChromeOS instance.

Bug:  882610 
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: Ib220575fbe42f026b1e5cb90d3bb6be9d0345414
Reviewed-on: https://chromium-review.googlesource.com/c/1274445
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606665}
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/chrome/browser/chromeos/chrome_browser_main_chromeos.h
[add] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/chrome/browser/chromeos/network_change_manager_client.cc
[add] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/chrome/browser/chromeos/network_change_manager_client.h
[add] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/chrome/browser/chromeos/network_change_manager_client_browsertest.cc
[add] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/chrome/browser/chromeos/network_change_manager_client_unittest.cc
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/chrome/browser/net/network_context_configuration_browsertest.cc
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/chrome/test/BUILD.gn
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/chromeos/network/BUILD.gn
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/chromeos/network/managed_state.h
[delete] https://crrev.com/025554ba9f2486bc651655cf08226a8cd93e377a/chromeos/network/network_change_notifier_chromeos.cc
[delete] https://crrev.com/025554ba9f2486bc651655cf08226a8cd93e377a/chromeos/network/network_change_notifier_chromeos.h
[delete] https://crrev.com/025554ba9f2486bc651655cf08226a8cd93e377a/chromeos/network/network_change_notifier_chromeos_unittest.cc
[delete] https://crrev.com/025554ba9f2486bc651655cf08226a8cd93e377a/chromeos/network/network_change_notifier_factory_chromeos.cc
[delete] https://crrev.com/025554ba9f2486bc651655cf08226a8cd93e377a/chromeos/network/network_change_notifier_factory_chromeos.h
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/chromeos/network/network_state.h
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/content/browser/browser_main_loop.h
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/content/browser/net_info_browsertest.cc
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/content/browser/network_service_instance.cc
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/content/public/browser/network_service_instance.h
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/content/public/test/browser_test_base.cc
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/net/BUILD.gn
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/net/base/network_change_notifier.cc
[add] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/net/base/network_change_notifier_chromeos.cc
[add] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/net/base/network_change_notifier_chromeos.h
[add] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/net/base/network_change_notifier_chromeos_unittest.cc
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/services/network/network_change_manager.cc
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/services/network/network_change_manager.h
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/services/network/network_context_unittest.cc
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/services/network/network_service.cc
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/services/network/public/mojom/network_change_manager.mojom
[modify] https://crrev.com/7b0677dd5848ec9f489652d899188731404defea/testing/buildbot/filters/mojo.fyi.chromeos.network_browser_tests.filter

Project Member

Comment 20 by bugdroid1@chromium.org, Nov 9

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

commit 0d2550b11b39253ef0351fdd85f94b10c97bb927
Author: Robbie McElrath <rmcelrath@chromium.org>
Date: Fri Nov 09 05:23:17 2018

Revert "Get NetworkChangeNotifier working on ChromeOS with network service."

This reverts commit 7b0677dd5848ec9f489652d899188731404defea.

Reason for revert: findit says this broke something. I'll revert and see if it's right tomorrow.

Original change's description:
> Get NetworkChangeNotifier working on ChromeOS with network service.
> 
> The current NetworkChangeNotifierChromeOS implementation won't work
> with the network service enabled because it listens for network changes
> from Shill, which only supports a single client. The browser process
> has other dependencies on Shill, so it has to be the client for the time
> being, meaning the network service can't directly listen for network
> changes and has to be notified of them from the browser process.
> 
> This CL splits the NetworkChangeNotifierChromeOS into two parts;
> the first will live in the browser process and listen to Shill, while
> the second is the actual NetworkChangeNotifierChromeOS implementation
> which will have an instance in both the browser and network processes.
> Since NetworkChangeNotifierChromeOS can't actually listen for network
> changes itself, it just gets notified of changes from part 1 via a new
> method in NetworkChangeManager. When the thing listening to Shill sees
> a network change, it notifies its local NetworkChangeNotifierChromeOS
> instance, and calls the new NetworkChangeManager method, the
> implementation of which then notifies the network service's
> NetworkChangeNotifierChromeOS instance.
> 
> Bug:  882610 
> Cq-Include-Trybots: luci.chromium.try:linux_mojo
> Change-Id: Ib220575fbe42f026b1e5cb90d3bb6be9d0345414
> Reviewed-on: https://chromium-review.googlesource.com/c/1274445
> Reviewed-by: Paul Jensen <pauljensen@chromium.org>
> Reviewed-by: Will Harris <wfh@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
> Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#606665}

TBR=stevenjb@chromium.org,jam@chromium.org,pauljensen@chromium.org,wfh@chromium.org,rmcelrath@chromium.org

Change-Id: I1fa2bcabe73082e02e59f7c613d08aec4ac94e57
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  882610 
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Reviewed-on: https://chromium-review.googlesource.com/c/1328701
Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606745}
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/chrome/browser/chromeos/chrome_browser_main_chromeos.h
[delete] https://crrev.com/f177acc5dea2dcb350839b2c6cf07fb2433812f2/chrome/browser/chromeos/network_change_manager_client.cc
[delete] https://crrev.com/f177acc5dea2dcb350839b2c6cf07fb2433812f2/chrome/browser/chromeos/network_change_manager_client.h
[delete] https://crrev.com/f177acc5dea2dcb350839b2c6cf07fb2433812f2/chrome/browser/chromeos/network_change_manager_client_browsertest.cc
[delete] https://crrev.com/f177acc5dea2dcb350839b2c6cf07fb2433812f2/chrome/browser/chromeos/network_change_manager_client_unittest.cc
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/chrome/browser/net/network_context_configuration_browsertest.cc
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/chrome/test/BUILD.gn
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/chromeos/network/BUILD.gn
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/chromeos/network/managed_state.h
[add] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/chromeos/network/network_change_notifier_chromeos.cc
[add] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/chromeos/network/network_change_notifier_chromeos.h
[add] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/chromeos/network/network_change_notifier_chromeos_unittest.cc
[add] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/chromeos/network/network_change_notifier_factory_chromeos.cc
[add] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/chromeos/network/network_change_notifier_factory_chromeos.h
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/chromeos/network/network_state.h
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/content/browser/browser_main_loop.h
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/content/browser/net_info_browsertest.cc
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/content/browser/network_service_instance.cc
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/content/public/browser/network_service_instance.h
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/content/public/test/browser_test_base.cc
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/net/BUILD.gn
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/net/base/network_change_notifier.cc
[delete] https://crrev.com/f177acc5dea2dcb350839b2c6cf07fb2433812f2/net/base/network_change_notifier_chromeos.cc
[delete] https://crrev.com/f177acc5dea2dcb350839b2c6cf07fb2433812f2/net/base/network_change_notifier_chromeos.h
[delete] https://crrev.com/f177acc5dea2dcb350839b2c6cf07fb2433812f2/net/base/network_change_notifier_chromeos_unittest.cc
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/services/network/network_change_manager.cc
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/services/network/network_change_manager.h
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/services/network/network_context_unittest.cc
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/services/network/network_service.cc
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/services/network/public/mojom/network_change_manager.mojom
[modify] https://crrev.com/0d2550b11b39253ef0351fdd85f94b10c97bb927/testing/buildbot/filters/mojo.fyi.chromeos.network_browser_tests.filter

Project Member

Comment 21 by bugdroid1@chromium.org, Nov 12

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

commit 1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1
Author: Robbie McElrath <rmcelrath@chromium.org>
Date: Mon Nov 12 22:13:48 2018

Reland "Get NetworkChangeNotifier working on ChromeOS with network service."

This reverts commit 0d2550b11b39253ef0351fdd85f94b10c97bb927.

Reason for revert: Fixed NetworkContextConfigurationFilePacBrowserTest

Original change's description:
> Revert "Get NetworkChangeNotifier working on ChromeOS with network service."
>
> This reverts commit 7b0677dd5848ec9f489652d899188731404defea.
>
> Reason for revert: findit says this broke something. I'll revert and see if it's right tomorrow.
>
> Original change's description:
> > Get NetworkChangeNotifier working on ChromeOS with network service.
> >
> > The current NetworkChangeNotifierChromeOS implementation won't work
> > with the network service enabled because it listens for network changes
> > from Shill, which only supports a single client. The browser process
> > has other dependencies on Shill, so it has to be the client for the time
> > being, meaning the network service can't directly listen for network
> > changes and has to be notified of them from the browser process.
> >
> > This CL splits the NetworkChangeNotifierChromeOS into two parts;
> > the first will live in the browser process and listen to Shill, while
> > the second is the actual NetworkChangeNotifierChromeOS implementation
> > which will have an instance in both the browser and network processes.
> > Since NetworkChangeNotifierChromeOS can't actually listen for network
> > changes itself, it just gets notified of changes from part 1 via a new
> > method in NetworkChangeManager. When the thing listening to Shill sees
> > a network change, it notifies its local NetworkChangeNotifierChromeOS
> > instance, and calls the new NetworkChangeManager method, the
> > implementation of which then notifies the network service's
> > NetworkChangeNotifierChromeOS instance.
> >
> > Bug:  882610 
> > Cq-Include-Trybots: luci.chromium.try:linux_mojo
> > Change-Id: Ib220575fbe42f026b1e5cb90d3bb6be9d0345414
> > Reviewed-on: https://chromium-review.googlesource.com/c/1274445
> > Reviewed-by: Paul Jensen <pauljensen@chromium.org>
> > Reviewed-by: Will Harris <wfh@chromium.org>
> > Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> > Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
> > Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#606665}
>
> TBR=stevenjb@chromium.org,jam@chromium.org,pauljensen@chromium.org,wfh@chromium.org,rmcelrath@chromium.org
>
> Change-Id: I1fa2bcabe73082e02e59f7c613d08aec4ac94e57
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug:  882610 
> Cq-Include-Trybots: luci.chromium.try:linux_mojo
> Reviewed-on: https://chromium-review.googlesource.com/c/1328701
> Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
> Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#606745}

TBR=stevenjb@chromium.org,jam@chromium.org,pauljensen@chromium.org,wfh@chromium.org,rmcelrath@chromium.org

Change-Id: Ied0722203a1fa29aa3420bb84c70dee15d47fbb6
Bug:  882610 
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Reviewed-on: https://chromium-review.googlesource.com/c/1329897
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607351}
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/chrome/browser/chromeos/chrome_browser_main_chromeos.h
[add] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/chrome/browser/chromeos/network_change_manager_client.cc
[add] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/chrome/browser/chromeos/network_change_manager_client.h
[add] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/chrome/browser/chromeos/network_change_manager_client_browsertest.cc
[add] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/chrome/browser/chromeos/network_change_manager_client_unittest.cc
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/chrome/browser/net/network_context_configuration_browsertest.cc
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/chrome/test/BUILD.gn
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/chromeos/network/BUILD.gn
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/chromeos/network/managed_state.h
[delete] https://crrev.com/d2b070e100025ba1fe8c3ac79772bbed1d4fb878/chromeos/network/network_change_notifier_chromeos.cc
[delete] https://crrev.com/d2b070e100025ba1fe8c3ac79772bbed1d4fb878/chromeos/network/network_change_notifier_chromeos.h
[delete] https://crrev.com/d2b070e100025ba1fe8c3ac79772bbed1d4fb878/chromeos/network/network_change_notifier_chromeos_unittest.cc
[delete] https://crrev.com/d2b070e100025ba1fe8c3ac79772bbed1d4fb878/chromeos/network/network_change_notifier_factory_chromeos.cc
[delete] https://crrev.com/d2b070e100025ba1fe8c3ac79772bbed1d4fb878/chromeos/network/network_change_notifier_factory_chromeos.h
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/chromeos/network/network_state.h
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/content/browser/browser_main_loop.h
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/content/browser/net_info_browsertest.cc
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/content/browser/network_service_instance.cc
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/content/public/browser/network_service_instance.h
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/content/public/test/browser_test_base.cc
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/net/BUILD.gn
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/net/base/network_change_notifier.cc
[add] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/net/base/network_change_notifier_chromeos.cc
[add] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/net/base/network_change_notifier_chromeos.h
[add] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/net/base/network_change_notifier_chromeos_unittest.cc
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/services/network/network_change_manager.cc
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/services/network/network_change_manager.h
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/services/network/network_context_unittest.cc
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/services/network/network_service.cc
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/services/network/public/mojom/network_change_manager.mojom
[modify] https://crrev.com/1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1/testing/buildbot/filters/mojo.fyi.chromeos.network_browser_tests.filter

Project Member

Comment 22 by bugdroid1@chromium.org, Nov 13

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

commit 53a1b6f6e1adae07f464990a4e9cb766832f10fe
Author: Robbie McElrath <rmcelrath@chromium.org>
Date: Tue Nov 13 08:28:14 2018

Revert "Reland "Get NetworkChangeNotifier working on ChromeOS with network service.""

This reverts commit 1ab94ee7bca8b041bdbd8fc9d19efc96aba255b1.

Reason for revert:  crbug.com/904739 

Original change's description:
> Reland "Get NetworkChangeNotifier working on ChromeOS with network service."
> 
> This reverts commit 0d2550b11b39253ef0351fdd85f94b10c97bb927.
> 
> Reason for revert: Fixed NetworkContextConfigurationFilePacBrowserTest
> 
> Original change's description:
> > Revert "Get NetworkChangeNotifier working on ChromeOS with network service."
> >
> > This reverts commit 7b0677dd5848ec9f489652d899188731404defea.
> >
> > Reason for revert: findit says this broke something. I'll revert and see if it's right tomorrow.
> >
> > Original change's description:
> > > Get NetworkChangeNotifier working on ChromeOS with network service.
> > >
> > > The current NetworkChangeNotifierChromeOS implementation won't work
> > > with the network service enabled because it listens for network changes
> > > from Shill, which only supports a single client. The browser process
> > > has other dependencies on Shill, so it has to be the client for the time
> > > being, meaning the network service can't directly listen for network
> > > changes and has to be notified of them from the browser process.
> > >
> > > This CL splits the NetworkChangeNotifierChromeOS into two parts;
> > > the first will live in the browser process and listen to Shill, while
> > > the second is the actual NetworkChangeNotifierChromeOS implementation
> > > which will have an instance in both the browser and network processes.
> > > Since NetworkChangeNotifierChromeOS can't actually listen for network
> > > changes itself, it just gets notified of changes from part 1 via a new
> > > method in NetworkChangeManager. When the thing listening to Shill sees
> > > a network change, it notifies its local NetworkChangeNotifierChromeOS
> > > instance, and calls the new NetworkChangeManager method, the
> > > implementation of which then notifies the network service's
> > > NetworkChangeNotifierChromeOS instance.
> > >
> > > Bug:  882610 
> > > Cq-Include-Trybots: luci.chromium.try:linux_mojo
> > > Change-Id: Ib220575fbe42f026b1e5cb90d3bb6be9d0345414
> > > Reviewed-on: https://chromium-review.googlesource.com/c/1274445
> > > Reviewed-by: Paul Jensen <pauljensen@chromium.org>
> > > Reviewed-by: Will Harris <wfh@chromium.org>
> > > Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> > > Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
> > > Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#606665}
> >
> > TBR=stevenjb@chromium.org,jam@chromium.org,pauljensen@chromium.org,wfh@chromium.org,rmcelrath@chromium.org
> >
> > Change-Id: I1fa2bcabe73082e02e59f7c613d08aec4ac94e57
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug:  882610 
> > Cq-Include-Trybots: luci.chromium.try:linux_mojo
> > Reviewed-on: https://chromium-review.googlesource.com/c/1328701
> > Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
> > Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#606745}
> 
> TBR=stevenjb@chromium.org,jam@chromium.org,pauljensen@chromium.org,wfh@chromium.org,rmcelrath@chromium.org
> 
> Change-Id: Ied0722203a1fa29aa3420bb84c70dee15d47fbb6
> Bug:  882610 
> Cq-Include-Trybots: luci.chromium.try:linux_mojo
> Reviewed-on: https://chromium-review.googlesource.com/c/1329897
> Reviewed-by: Paul Jensen <pauljensen@chromium.org>
> Reviewed-by: Will Harris <wfh@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
> Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
> Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#607351}

TBR=stevenjb@chromium.org,jam@chromium.org,pauljensen@chromium.org,wfh@chromium.org,rmcelrath@chromium.org

Change-Id: Iaf54b01741708b865f8ab5979afc9292babdb1c2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  882610 
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Reviewed-on: https://chromium-review.googlesource.com/c/1333248
Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607519}
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/chrome/browser/chromeos/chrome_browser_main_chromeos.h
[delete] https://crrev.com/a852678d14edee58ec1f83c56196547a4a5cc09b/chrome/browser/chromeos/network_change_manager_client.cc
[delete] https://crrev.com/a852678d14edee58ec1f83c56196547a4a5cc09b/chrome/browser/chromeos/network_change_manager_client.h
[delete] https://crrev.com/a852678d14edee58ec1f83c56196547a4a5cc09b/chrome/browser/chromeos/network_change_manager_client_browsertest.cc
[delete] https://crrev.com/a852678d14edee58ec1f83c56196547a4a5cc09b/chrome/browser/chromeos/network_change_manager_client_unittest.cc
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/chrome/browser/net/network_context_configuration_browsertest.cc
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/chrome/test/BUILD.gn
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/chromeos/network/BUILD.gn
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/chromeos/network/managed_state.h
[add] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/chromeos/network/network_change_notifier_chromeos.cc
[add] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/chromeos/network/network_change_notifier_chromeos.h
[add] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/chromeos/network/network_change_notifier_chromeos_unittest.cc
[add] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/chromeos/network/network_change_notifier_factory_chromeos.cc
[add] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/chromeos/network/network_change_notifier_factory_chromeos.h
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/chromeos/network/network_state.h
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/content/browser/browser_main_loop.h
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/content/browser/net_info_browsertest.cc
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/content/browser/network_service_instance.cc
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/content/public/browser/network_service_instance.h
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/content/public/test/browser_test_base.cc
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/net/BUILD.gn
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/net/base/network_change_notifier.cc
[delete] https://crrev.com/a852678d14edee58ec1f83c56196547a4a5cc09b/net/base/network_change_notifier_chromeos.cc
[delete] https://crrev.com/a852678d14edee58ec1f83c56196547a4a5cc09b/net/base/network_change_notifier_chromeos.h
[delete] https://crrev.com/a852678d14edee58ec1f83c56196547a4a5cc09b/net/base/network_change_notifier_chromeos_unittest.cc
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/services/network/network_change_manager.cc
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/services/network/network_change_manager.h
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/services/network/network_context_unittest.cc
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/services/network/network_service.cc
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/services/network/public/mojom/network_change_manager.mojom
[modify] https://crrev.com/53a1b6f6e1adae07f464990a4e9cb766832f10fe/testing/buildbot/filters/mojo.fyi.chromeos.network_browser_tests.filter

Project Member

Comment 23 by bugdroid1@chromium.org, Nov 15

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

commit 31391ba33a8da1d9618fbfdb42aaa911cb986cf3
Author: Robbie McElrath <rmcelrath@chromium.org>
Date: Thu Nov 15 02:04:50 2018

Fix race condition in net::SerialWorker.

net::SerialWorker is a RefCountedThreadSafe object that also uses
WeakPtrFactory to create WeakPtrs of itself. To run whatever work it's
supposed to run, it PostTaskWithTraitsAndReply's to another sequence to
do the work there, and then gets called back when the work is complete.
The work callback holds a (refcounted) reference to the SerialWorker,
and the reply callback is bound to a WeakPtr to ensure the SerialWorker
will still be deleted if posting the reply fails. WeakPtr enforces that
all dereferences to it, as well as its invalidation, must happen on the
same sequence to avoid races. When the reply callback is being called,
it dereferences the SerialWorker WeakPtr on the original sequence,
which binds that WeakPtr to that sequence. It's possible for the
SerialWorker’s owner to release it after the WeakPtr has been checked,
but before the worker function has returned, in which case the worker
function will have the last reference to the SerialWorker. In that case,
when the worker function finally does return, it will delete the
SerialWorker, which will delete its WeakPtrFactory, which will
invalidate existing WeakPtrs. However, the WeakPtr was previously
dereferenced on the SerialWorker sequence, and now it’s being
invalidated on the worker sequence, which is invalid.

To fix this, this CL makes SerialWorker a RefCountedDeleteOnSequence to
ensure the deletion always happens in the right sequence.

Bug:  882610 
Change-Id: If738d3724384ffd5ac210130415bce7262932feb
Reviewed-on: https://chromium-review.googlesource.com/c/1336066
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Reviewed-by: Eric Roman <eroman@chromium.org>
Reviewed-by: Eric Orth <ericorth@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608223}
[modify] https://crrev.com/31391ba33a8da1d9618fbfdb42aaa911cb986cf3/net/dns/dns_config_service_posix_unittest.cc
[modify] https://crrev.com/31391ba33a8da1d9618fbfdb42aaa911cb986cf3/net/dns/serial_worker.cc
[modify] https://crrev.com/31391ba33a8da1d9618fbfdb42aaa911cb986cf3/net/dns/serial_worker.h

Project Member

Comment 24 by bugdroid1@chromium.org, Nov 15

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

commit 21f4d49913435d77666383128b62657b56e0bfb3
Author: Robbie McElrath <rmcelrath@chromium.org>
Date: Thu Nov 15 05:10:03 2018

Reland "Get NetworkChangeNotifier working on ChromeOS with network service."

This is identical to crrev.com/c/1329897, but the underlying issue that
caused that CL to break unit tests was fixed in crrev.com/c/1336066.

Original change's description:
> Get NetworkChangeNotifier working on ChromeOS with network service.
>
> The current NetworkChangeNotifierChromeOS implementation won't work
> with the network service enabled because it listens for network changes
> from Shill, which only supports a single client. The browser process
> has other dependencies on Shill, so it has to be the client for the time
> being, meaning the network service can't directly listen for network
> changes and has to be notified of them from the browser process.
>
> This CL splits the NetworkChangeNotifierChromeOS into two parts;
> the first will live in the browser process and listen to Shill, while
> the second is the actual NetworkChangeNotifierChromeOS implementation
> which will have an instance in both the browser and network processes.
> Since NetworkChangeNotifierChromeOS can't actually listen for network
> changes itself, it just gets notified of changes from part 1 via a new
> method in NetworkChangeManager. When the thing listening to Shill sees
> a network change, it notifies its local NetworkChangeNotifierChromeOS
> instance, and calls the new NetworkChangeManager method, the
> implementation of which then notifies the network service's
> NetworkChangeNotifierChromeOS instance.
>
> Bug:  882610 
> Cq-Include-Trybots: luci.chromium.try:linux_mojo
> Change-Id: Ib220575fbe42f026b1e5cb90d3bb6be9d0345414
> Reviewed-on: https://chromium-review.googlesource.com/c/1274445
> Reviewed-by: Paul Jensen <pauljensen@chromium.org>
> Reviewed-by: Will Harris <wfh@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
> Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#606665}

Bug:  882610 
Change-Id: I05ecbac510b479eb28520cc0b0ad5b613519fab7
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Reviewed-on: https://chromium-review.googlesource.com/c/1336154
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608265}
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/chrome/browser/chromeos/chrome_browser_main_chromeos.h
[add] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/chrome/browser/chromeos/network_change_manager_client.cc
[add] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/chrome/browser/chromeos/network_change_manager_client.h
[add] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/chrome/browser/chromeos/network_change_manager_client_browsertest.cc
[add] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/chrome/browser/chromeos/network_change_manager_client_unittest.cc
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/chrome/browser/net/network_context_configuration_browsertest.cc
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/chrome/test/BUILD.gn
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/chromeos/network/BUILD.gn
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/chromeos/network/managed_state.h
[delete] https://crrev.com/0de7e526fb15ae64006a88cea29a6eeca7d63d70/chromeos/network/network_change_notifier_chromeos.cc
[delete] https://crrev.com/0de7e526fb15ae64006a88cea29a6eeca7d63d70/chromeos/network/network_change_notifier_chromeos.h
[delete] https://crrev.com/0de7e526fb15ae64006a88cea29a6eeca7d63d70/chromeos/network/network_change_notifier_chromeos_unittest.cc
[delete] https://crrev.com/0de7e526fb15ae64006a88cea29a6eeca7d63d70/chromeos/network/network_change_notifier_factory_chromeos.cc
[delete] https://crrev.com/0de7e526fb15ae64006a88cea29a6eeca7d63d70/chromeos/network/network_change_notifier_factory_chromeos.h
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/chromeos/network/network_state.h
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/content/browser/browser_main_loop.h
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/content/browser/net_info_browsertest.cc
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/content/browser/network_service_instance.cc
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/content/public/browser/network_service_instance.h
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/content/public/test/browser_test_base.cc
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/net/BUILD.gn
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/net/base/network_change_notifier.cc
[add] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/net/base/network_change_notifier_chromeos.cc
[add] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/net/base/network_change_notifier_chromeos.h
[add] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/net/base/network_change_notifier_chromeos_unittest.cc
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/services/network/network_change_manager.cc
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/services/network/network_change_manager.h
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/services/network/network_context_unittest.cc
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/services/network/network_service.cc
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/services/network/public/mojom/network_change_manager.mojom
[modify] https://crrev.com/21f4d49913435d77666383128b62657b56e0bfb3/testing/buildbot/filters/mojo.fyi.chromeos.network_browser_tests.filter

Project Member

Comment 25 by bugdroid1@chromium.org, Nov 15

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

commit 7abba9ecc53b13bf108f4c827851855944050a78
Author: Robbie McElrath <rmcelrath@chromium.org>
Date: Thu Nov 15 20:23:54 2018

Revert "Reland "Get NetworkChangeNotifier working on ChromeOS with network service.""

This reverts commit 21f4d49913435d77666383128b62657b56e0bfb3.

Reason for revert:  crbug.com/905619 

Original change's description:
> Reland "Get NetworkChangeNotifier working on ChromeOS with network service."
> 
> This is identical to crrev.com/c/1329897, but the underlying issue that
> caused that CL to break unit tests was fixed in crrev.com/c/1336066.
> 
> Original change's description:
> > Get NetworkChangeNotifier working on ChromeOS with network service.
> >
> > The current NetworkChangeNotifierChromeOS implementation won't work
> > with the network service enabled because it listens for network changes
> > from Shill, which only supports a single client. The browser process
> > has other dependencies on Shill, so it has to be the client for the time
> > being, meaning the network service can't directly listen for network
> > changes and has to be notified of them from the browser process.
> >
> > This CL splits the NetworkChangeNotifierChromeOS into two parts;
> > the first will live in the browser process and listen to Shill, while
> > the second is the actual NetworkChangeNotifierChromeOS implementation
> > which will have an instance in both the browser and network processes.
> > Since NetworkChangeNotifierChromeOS can't actually listen for network
> > changes itself, it just gets notified of changes from part 1 via a new
> > method in NetworkChangeManager. When the thing listening to Shill sees
> > a network change, it notifies its local NetworkChangeNotifierChromeOS
> > instance, and calls the new NetworkChangeManager method, the
> > implementation of which then notifies the network service's
> > NetworkChangeNotifierChromeOS instance.
> >
> > Bug:  882610 
> > Cq-Include-Trybots: luci.chromium.try:linux_mojo
> > Change-Id: Ib220575fbe42f026b1e5cb90d3bb6be9d0345414
> > Reviewed-on: https://chromium-review.googlesource.com/c/1274445
> > Reviewed-by: Paul Jensen <pauljensen@chromium.org>
> > Reviewed-by: Will Harris <wfh@chromium.org>
> > Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> > Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
> > Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#606665}
> 
> Bug:  882610 
> Change-Id: I05ecbac510b479eb28520cc0b0ad5b613519fab7
> Cq-Include-Trybots: luci.chromium.try:linux_mojo
> Reviewed-on: https://chromium-review.googlesource.com/c/1336154
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Reviewed-by: Paul Jensen <pauljensen@chromium.org>
> Reviewed-by: Will Harris <wfh@chromium.org>
> Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
> Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#608265}

TBR=stevenjb@chromium.org,jam@chromium.org,pauljensen@chromium.org,wfh@chromium.org,rmcelrath@chromium.org

Change-Id: I0bda42c81a1e445c9d530576d8b6f75630d0c0d8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  882610 
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Reviewed-on: https://chromium-review.googlesource.com/c/1338204
Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608491}
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/chrome/browser/chromeos/chrome_browser_main_chromeos.h
[delete] https://crrev.com/dba77bd3350d39eac12db8aba801a7ef0c3c190f/chrome/browser/chromeos/network_change_manager_client.cc
[delete] https://crrev.com/dba77bd3350d39eac12db8aba801a7ef0c3c190f/chrome/browser/chromeos/network_change_manager_client.h
[delete] https://crrev.com/dba77bd3350d39eac12db8aba801a7ef0c3c190f/chrome/browser/chromeos/network_change_manager_client_browsertest.cc
[delete] https://crrev.com/dba77bd3350d39eac12db8aba801a7ef0c3c190f/chrome/browser/chromeos/network_change_manager_client_unittest.cc
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/chrome/browser/net/network_context_configuration_browsertest.cc
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/chrome/test/BUILD.gn
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/chromeos/network/BUILD.gn
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/chromeos/network/managed_state.h
[add] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/chromeos/network/network_change_notifier_chromeos.cc
[add] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/chromeos/network/network_change_notifier_chromeos.h
[add] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/chromeos/network/network_change_notifier_chromeos_unittest.cc
[add] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/chromeos/network/network_change_notifier_factory_chromeos.cc
[add] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/chromeos/network/network_change_notifier_factory_chromeos.h
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/chromeos/network/network_state.h
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/content/browser/browser_main_loop.h
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/content/browser/net_info_browsertest.cc
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/content/browser/network_service_instance.cc
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/content/public/browser/network_service_instance.h
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/content/public/test/browser_test_base.cc
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/net/BUILD.gn
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/net/base/network_change_notifier.cc
[delete] https://crrev.com/dba77bd3350d39eac12db8aba801a7ef0c3c190f/net/base/network_change_notifier_chromeos.cc
[delete] https://crrev.com/dba77bd3350d39eac12db8aba801a7ef0c3c190f/net/base/network_change_notifier_chromeos.h
[delete] https://crrev.com/dba77bd3350d39eac12db8aba801a7ef0c3c190f/net/base/network_change_notifier_chromeos_unittest.cc
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/services/network/network_change_manager.cc
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/services/network/network_change_manager.h
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/services/network/network_context_unittest.cc
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/services/network/network_service.cc
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/services/network/public/mojom/network_change_manager.mojom
[modify] https://crrev.com/7abba9ecc53b13bf108f4c827851855944050a78/testing/buildbot/filters/mojo.fyi.chromeos.network_browser_tests.filter

Project Member

Comment 26 by bugdroid1@chromium.org, Nov 19

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

commit 995a2bf6456a8296032a11fe02a05f51e0c33ea0
Author: Robbie McElrath <rmcelrath@chromium.org>
Date: Mon Nov 19 23:21:59 2018

Reland "Get NetworkChangeNotifier working on ChromeOS with network service."

This fixes 2 tests that were flaky on the waterfall. Diff patchsets 1
and 2 to see what changed.

Original change's description:
> Get NetworkChangeNotifier working on ChromeOS with network service.
>
> The current NetworkChangeNotifierChromeOS implementation won't work
> with the network service enabled because it listens for network changes
> from Shill, which only supports a single client. The browser process
> has other dependencies on Shill, so it has to be the client for the time
> being, meaning the network service can't directly listen for network
> changes and has to be notified of them from the browser process.
>
> This CL splits the NetworkChangeNotifierChromeOS into two parts;
> the first will live in the browser process and listen to Shill, while
> the second is the actual NetworkChangeNotifierChromeOS implementation
> which will have an instance in both the browser and network processes.
> Since NetworkChangeNotifierChromeOS can't actually listen for network
> changes itself, it just gets notified of changes from part 1 via a new
> method in NetworkChangeManager. When the thing listening to Shill sees
> a network change, it notifies its local NetworkChangeNotifierChromeOS
> instance, and calls the new NetworkChangeManager method, the
> implementation of which then notifies the network service's
> NetworkChangeNotifierChromeOS instance.
>
> Bug:  882610 
> Cq-Include-Trybots: luci.chromium.try:linux_mojo
> Change-Id: Ib220575fbe42f026b1e5cb90d3bb6be9d0345414
> Reviewed-on: https://chromium-review.googlesource.com/c/1274445
> Reviewed-by: Paul Jensen <pauljensen@chromium.org>
> Reviewed-by: Will Harris <wfh@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
> Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#606665}

Bug:  882610 
Change-Id: I5547353ed5f944620548109c40eeb149fd85a710
Reviewed-on: https://chromium-review.googlesource.com/c/1338493
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609498}
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/chrome/browser/chrome_browser_main_browsertest.cc
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/chrome/browser/chromeos/chrome_browser_main_chromeos.h
[add] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/chrome/browser/chromeos/network_change_manager_client.cc
[add] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/chrome/browser/chromeos/network_change_manager_client.h
[add] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/chrome/browser/chromeos/network_change_manager_client_browsertest.cc
[add] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/chrome/browser/chromeos/network_change_manager_client_unittest.cc
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/chrome/browser/net/network_context_configuration_browsertest.cc
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/chrome/test/BUILD.gn
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/chromeos/network/BUILD.gn
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/chromeos/network/managed_state.h
[delete] https://crrev.com/bf059a0fe4f7e577e2a151924d37f0b182f7f5fe/chromeos/network/network_change_notifier_chromeos.cc
[delete] https://crrev.com/bf059a0fe4f7e577e2a151924d37f0b182f7f5fe/chromeos/network/network_change_notifier_chromeos.h
[delete] https://crrev.com/bf059a0fe4f7e577e2a151924d37f0b182f7f5fe/chromeos/network/network_change_notifier_chromeos_unittest.cc
[delete] https://crrev.com/bf059a0fe4f7e577e2a151924d37f0b182f7f5fe/chromeos/network/network_change_notifier_factory_chromeos.cc
[delete] https://crrev.com/bf059a0fe4f7e577e2a151924d37f0b182f7f5fe/chromeos/network/network_change_notifier_factory_chromeos.h
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/chromeos/network/network_state.h
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/content/browser/browser_main_loop.h
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/content/browser/net_info_browsertest.cc
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/content/browser/network_service_instance.cc
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/content/public/browser/network_service_instance.h
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/content/public/test/browser_test_base.cc
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/net/BUILD.gn
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/net/base/network_change_notifier.cc
[add] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/net/base/network_change_notifier_chromeos.cc
[add] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/net/base/network_change_notifier_chromeos.h
[add] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/net/base/network_change_notifier_chromeos_unittest.cc
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/services/network/network_change_manager.cc
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/services/network/network_change_manager.h
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/services/network/network_context_unittest.cc
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/services/network/network_service.cc
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/services/network/public/mojom/network_change_manager.mojom
[modify] https://crrev.com/995a2bf6456a8296032a11fe02a05f51e0c33ea0/testing/buildbot/filters/mojo.fyi.chromeos.network_browser_tests.filter

Status: Fixed (was: Started)

Sign in to add a comment