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/omaha_request_action.cc b/omaha_request_action.cc
index dff8ad3..2f361e5 100644
--- a/omaha_request_action.cc
+++ b/omaha_request_action.cc
@@ -21,6 +21,7 @@
 #include <expat.h>
 
 #include "update_engine/action_pipe.h"
+#include "update_engine/connection_manager.h"
 #include "update_engine/constants.h"
 #include "update_engine/hardware_interface.h"
 #include "update_engine/omaha_hash_calculator.h"
@@ -1448,7 +1449,8 @@
   NetworkConnectionType type;
   NetworkTethering tethering;
   RealDBusWrapper dbus_iface;
-  ConnectionManager* connection_manager = system_state_->connection_manager();
+  ConnectionManagerInterface* connection_manager =
+      system_state_->connection_manager();
   if (!connection_manager->GetConnectionProperties(&dbus_iface,
                                                    &type, &tethering)) {
     LOG(INFO) << "We could not determine our connection type. "
@@ -1457,7 +1459,7 @@
   }
   bool is_allowed = connection_manager->IsUpdateAllowedOver(type, tethering);
   LOG(INFO) << "We are connected via "
-            << connection_manager->StringForConnectionType(type)
+            << ConnectionManager::StringForConnectionType(type)
             << ", Updates allowed: " << (is_allowed ? "Yes" : "No");
   return is_allowed;
 }