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/mock_connection_manager.h b/mock_connection_manager.h
index 9530865..609b51d 100644
--- a/mock_connection_manager.h
+++ b/mock_connection_manager.h
@@ -7,17 +7,16 @@
#include <gmock/gmock.h>
-#include "update_engine/connection_manager.h"
+#include "update_engine/connection_manager_interface.h"
namespace chromeos_update_engine {
// This class mocks the generic interface to the connection manager
// (e.g FlimFlam, Shill, etc.) to consolidate all connection-related
// logic in update_engine.
-class MockConnectionManager : public ConnectionManager {
+class MockConnectionManager : public ConnectionManagerInterface {
public:
- explicit MockConnectionManager(SystemState* system_state)
- : ConnectionManager(system_state) {}
+ MockConnectionManager() = default;
MOCK_CONST_METHOD3(GetConnectionProperties,
bool(DBusWrapperInterface* dbus_iface,
@@ -26,12 +25,6 @@
MOCK_CONST_METHOD2(IsUpdateAllowedOver, bool(NetworkConnectionType type,
NetworkTethering tethering));
-
- MOCK_CONST_METHOD1(StringForConnectionType,
- const char*(NetworkConnectionType type));
-
- MOCK_CONST_METHOD1(StringForTethering,
- const char*(NetworkTethering tethering));
};
} // namespace chromeos_update_engine