update_engine: Move ConnectionManager to an abstract Interface.
MockConnectionManager required to use one of ConnectionManager
constructors passing pointers that won't be use by the mock. This
patch moves the interface to its own ConnectionManagerInterface class.
BUG=None
TEST=unittests still pass.
Change-Id: I9ed09daf8e4256304be7dab30cfbe751901dc24b
Reviewed-on: https://chromium-review.googlesource.com/290120
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
diff --git a/connection_manager.cc b/connection_manager.cc
index 62bb11e..45b6467 100644
--- a/connection_manager.cc
+++ b/connection_manager.cc
@@ -253,8 +253,9 @@
}
}
+// static
const char* ConnectionManager::StringForConnectionType(
- NetworkConnectionType type) const {
+ NetworkConnectionType type) {
switch (type) {
case NetworkConnectionType::kEthernet:
return shill::kTypeEthernet;
@@ -272,8 +273,8 @@
return "Unknown";
}
-const char* ConnectionManager::StringForTethering(
- NetworkTethering tethering) const {
+// static
+const char* ConnectionManager::StringForTethering(NetworkTethering tethering) {
switch (tethering) {
case NetworkTethering::kNotDetected:
return shill::kTetheringNotDetectedState;