Commit 068a82af authored by Hugo Benichi's avatar Hugo Benichi Committed by Commit Bot

arc: net: print NetworkConfiguration service name

It is sometimes necessary to correlate Android logs with host logs for a
specific network service for debugging some connectivity issues. This is
difficult to do with anonymized logs from feedback reports which do not
have GUIDs or SSIDs.

This patch adds to ARC++'s net.mojom NetworkConfiguration objects the
DBUS path of the associated shill service. This will allow ARC++ to
print it in logcat and dumpsys without leaking any PII. The service path
is essentially a monotonically growing integer that does not persist
after reboot.

dumpsys wifi.

Bug: 147270970
Test: flashed ARC and Chrome on eve, manually checked logcat and
Change-Id: I61c1a7b3b5476975a72e31347b6af485f9e0961e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2021786Reviewed-by: default avatarJorge Lucangeli Obes <jorgelo@chromium.org>
Reviewed-by: default avatarHidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Hugo Benichi <hugobenichi@google.com>
Cr-Commit-Position: refs/heads/master@{#735750}
parent 34645ead
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Next MinVersion: 12 // Next MinVersion: 13
// This file defines the mojo interface between the ARC networking stack and // This file defines the mojo interface between the ARC networking stack and
// Chrome OS. There are three different groups of interactions: // Chrome OS. There are three different groups of interactions:
...@@ -210,6 +210,9 @@ struct NetworkConfiguration { ...@@ -210,6 +210,9 @@ struct NetworkConfiguration {
// True if this network is the host default network. // True if this network is the host default network.
[MinVersion=11] bool is_default_network; [MinVersion=11] bool is_default_network;
// The name of the shill service associated with this network connection.
[MinVersion=12] string? service_name;
}; };
// Describes a Wifi network configuration that ARC has requested the host to // Describes a Wifi network configuration that ARC has requested the host to
......
...@@ -401,6 +401,7 @@ std::vector<arc::mojom::NetworkConfigurationPtr> TranslateNetworkStates( ...@@ -401,6 +401,7 @@ std::vector<arc::mojom::NetworkConfigurationPtr> TranslateNetworkStates(
state, chromeos::network_util::TranslateNetworkStateToONC(state).get()); state, chromeos::network_util::TranslateNetworkStateToONC(state).get());
network->is_default_network = network->is_default_network =
(network_path == GetStateHandler()->default_network_path()); (network_path == GetStateHandler()->default_network_path());
network->service_name = network_path;
networks.push_back(std::move(network)); networks.push_back(std::move(network));
} }
return networks; return networks;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment