diff options
author | Sen Jiang <senj@google.com> | 2016-05-20 16:15:29 -0700 |
---|---|---|
committer | Sen Jiang <senj@google.com> | 2016-06-07 00:07:46 +0000 |
commit | 255e22b82af3a52218eaea66acc734ec25cfeab6 (patch) | |
tree | 4e06155b189999061af8238699a7ac93ac4fa906 /metrics_utils.cc | |
parent | a35896c0ab209488b347672e9c917355b3fd8f51 (diff) |
Move ParseConnection*() to connection_utils.
We don't need real_shill_provider if USE_DBUS is 0, but we still need
these functions, and they have a duplicate copy in connection_manager,
so put them in utils and deduplicate.
Also moved StringForConnectionType() to connection_utils.
Bug: 28800946
Test: mma
Change-Id: If535fdc52bc8fb267921bea02b31d8d6580d5d54
Diffstat (limited to 'metrics_utils.cc')
-rw-r--r-- | metrics_utils.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/metrics_utils.cc b/metrics_utils.cc index e165e897..263bacd2 100644 --- a/metrics_utils.cc +++ b/metrics_utils.cc @@ -228,31 +228,31 @@ metrics::DownloadErrorCode GetDownloadErrorCode(ErrorCode code) { return metrics::DownloadErrorCode::kInputMalformed; } -metrics::ConnectionType GetConnectionType(NetworkConnectionType type, - NetworkTethering tethering) { +metrics::ConnectionType GetConnectionType(ConnectionType type, + ConnectionTethering tethering) { switch (type) { - case NetworkConnectionType::kUnknown: + case ConnectionType::kUnknown: return metrics::ConnectionType::kUnknown; - case NetworkConnectionType::kEthernet: - if (tethering == NetworkTethering::kConfirmed) + case ConnectionType::kEthernet: + if (tethering == ConnectionTethering::kConfirmed) return metrics::ConnectionType::kTetheredEthernet; else return metrics::ConnectionType::kEthernet; - case NetworkConnectionType::kWifi: - if (tethering == NetworkTethering::kConfirmed) + case ConnectionType::kWifi: + if (tethering == ConnectionTethering::kConfirmed) return metrics::ConnectionType::kTetheredWifi; else return metrics::ConnectionType::kWifi; - case NetworkConnectionType::kWimax: + case ConnectionType::kWimax: return metrics::ConnectionType::kWimax; - case NetworkConnectionType::kBluetooth: + case ConnectionType::kBluetooth: return metrics::ConnectionType::kBluetooth; - case NetworkConnectionType::kCellular: + case ConnectionType::kCellular: return metrics::ConnectionType::kCellular; } |