summaryrefslogtreecommitdiffstats
path: root/chromium/net/base/network_change_notifier.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/net/base/network_change_notifier.h')
-rw-r--r--chromium/net/base/network_change_notifier.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/chromium/net/base/network_change_notifier.h b/chromium/net/base/network_change_notifier.h
index 2ac6f578109..6b801bc7c42 100644
--- a/chromium/net/base/network_change_notifier.h
+++ b/chromium/net/base/network_change_notifier.h
@@ -32,16 +32,19 @@ class AddressTrackerLinux;
// destroyed on the same thread.
class NET_EXPORT NetworkChangeNotifier {
public:
- // Using the terminology of the Network Information API:
- // http://www.w3.org/TR/netinfo-api.
+ // This is a superset of the connection types in the NetInfo v3 specification:
+ // http://w3c.github.io/netinfo/.
enum ConnectionType {
- CONNECTION_UNKNOWN = 0, // A connection exists, but its type is unknown.
+ CONNECTION_UNKNOWN = 0, // A connection exists, but its type is unknown.
+ // Also used as a default value.
CONNECTION_ETHERNET = 1,
CONNECTION_WIFI = 2,
CONNECTION_2G = 3,
CONNECTION_3G = 4,
CONNECTION_4G = 5,
- CONNECTION_NONE = 6 // No connection.
+ CONNECTION_NONE = 6, // No connection.
+ CONNECTION_BLUETOOTH = 7,
+ CONNECTION_LAST = CONNECTION_BLUETOOTH
};
class NET_EXPORT IPAddressObserver {
@@ -224,8 +227,17 @@ class NET_EXPORT NetworkChangeNotifier {
// Register the Observer callbacks for producing histogram data. This
// should be called from the network thread to avoid race conditions.
+ // ShutdownHistogramWatcher() must be called prior to NetworkChangeNotifier
+ // destruction.
static void InitHistogramWatcher();
+ // Unregister the Observer callbacks for producing histogram data. This
+ // should be called from the network thread to avoid race conditions.
+ static void ShutdownHistogramWatcher();
+
+ // Log the |NCN.NetworkOperatorMCCMNC| histogram.
+ static void LogOperatorCodeHistogram(ConnectionType type);
+
// Allows a second NetworkChangeNotifier to be created for unit testing, so
// the test suite can create a MockNetworkChangeNotifier, but platform
// specific NetworkChangeNotifiers can also be created for testing. To use,