Commit d5afadae authored by Ken Rockot's avatar Ken Rockot Committed by Commit Bot

Add histogram for connection type changes

This records the network connection type any time it changes.

Also adds an enum histogram value for the new 5G type that was
recently added to the ConnectionType enum.

Bug: 1127134
Change-Id: I5a7d1306b69c4714a8b24a5462871aa0842121d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2431589
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: default avatarBrian White <bcwhite@chromium.org>
Reviewed-by: default avatarZhongyi Shi <zhongyi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811453}
parent 00fd2a66
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/metrics/histogram_functions.h"
#include "base/no_destructor.h" #include "base/no_destructor.h"
#include "base/optional.h" #include "base/optional.h"
#include "base/sequence_checker.h" #include "base/sequence_checker.h"
...@@ -149,6 +150,10 @@ class NetworkChangeNotifier::NetworkChangeCalculator ...@@ -149,6 +150,10 @@ class NetworkChangeNotifier::NetworkChangeCalculator
(pending_connection_type_ == CONNECTION_NONE)) { (pending_connection_type_ == CONNECTION_NONE)) {
return; return;
} }
base::UmaHistogramEnumeration("Net.NetworkChangeNotifier.NewConnectionType",
pending_connection_type_, CONNECTION_LAST);
have_announced_ = true; have_announced_ = true;
last_announced_connection_type_ = pending_connection_type_; last_announced_connection_type_ = pending_connection_type_;
// Immediately before sending out an online signal, send out an offline // Immediately before sending out an online signal, send out an offline
......
...@@ -51045,6 +51045,7 @@ Called by update_net_trust_anchors.py.--> ...@@ -51045,6 +51045,7 @@ Called by update_net_trust_anchors.py.-->
<int value="5" label="4g"/> <int value="5" label="4g"/>
<int value="6" label="None"/> <int value="6" label="None"/>
<int value="7" label="Bluetooth"/> <int value="7" label="Bluetooth"/>
<int value="8" label="5g"/>
</enum> </enum>
<enum name="NetworkCorruptedProfile"> <enum name="NetworkCorruptedProfile">
...@@ -1740,6 +1740,16 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. ...@@ -1740,6 +1740,16 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
</summary> </summary>
</histogram> </histogram>
<histogram name="Net.NetworkChangeNotifier.NewConnectionType"
enum="NetworkConnectionType" expires_after="2021-03-30">
<owner>rockot@google.com</owner>
<owner>src/net/OWNERS</owner>
<summary>
The new network connection type any time a change to the device's active
default network is observed.
</summary>
</histogram>
<histogram name="Net.NetworkConfigWatcherMac.SCDynamicStore.Create" <histogram name="Net.NetworkConfigWatcherMac.SCDynamicStore.Create"
enum="SCStatusCode" expires_after="M85"> enum="SCStatusCode" expires_after="M85">
<owner>mef@chromium.org</owner> <owner>mef@chromium.org</owner>
......
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