shill: include DBusPropertiesProxy creation for cellular only

DBusPropertiesProxy is compiled for cellular only. So move the
creation API under cellular as well.

While there, remove unnecessary blank lines between #if clauses.

BUG=chromium:517680
TEST=USE="-cellular" FEATURES=test emerge-$BOARD shill
CQ-DEPEND=CL:295772

Change-Id: Iff256a40653d85bdb0db44f60af9d8f54139bd19
Reviewed-on: https://chromium-review.googlesource.com/295766
Commit-Ready: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
diff --git a/control_interface.h b/control_interface.h
index 1d7bf96..fb95a7c 100644
--- a/control_interface.h
+++ b/control_interface.h
@@ -98,10 +98,6 @@
       const std::string& connection_name,
       const base::Closure& on_connection_vanished) = 0;
 
-  virtual DBusPropertiesProxyInterface* CreateDBusPropertiesProxy(
-      const std::string& path,
-      const std::string& service) = 0;
-
   virtual DBusServiceProxyInterface* CreateDBusServiceProxy() = 0;
 
   // The caller retains ownership of 'delegate'.  It must not be deleted before
@@ -141,6 +137,10 @@
   virtual PermissionBrokerProxyInterface* CreatePermissionBrokerProxy() = 0;
 
 #if !defined(DISABLE_CELLULAR)
+  virtual DBusPropertiesProxyInterface* CreateDBusPropertiesProxy(
+      const std::string& path,
+      const std::string& service) = 0;
+
   virtual DBusObjectManagerProxyInterface* CreateDBusObjectManagerProxy(
       const std::string& path,
       const std::string& service,
diff --git a/dbus/chromeos_dbus_control.cc b/dbus/chromeos_dbus_control.cc
index 0ebe5bc..7800f8e 100644
--- a/dbus/chromeos_dbus_control.cc
+++ b/dbus/chromeos_dbus_control.cc
@@ -142,12 +142,6 @@
                                         on_connection_vanished);
 }
 
-DBusPropertiesProxyInterface* ChromeosDBusControl::CreateDBusPropertiesProxy(
-    const string& path,
-    const string& service) {
-  return new ChromeosDBusPropertiesProxy(proxy_bus_, path, service);
-}
-
 DBusServiceProxyInterface* ChromeosDBusControl::CreateDBusServiceProxy() {
   return nullptr;
 }
@@ -217,6 +211,12 @@
 }
 
 #if !defined(DISABLE_CELLULAR)
+DBusPropertiesProxyInterface* ChromeosDBusControl::CreateDBusPropertiesProxy(
+    const string& path,
+    const string& service) {
+  return new ChromeosDBusPropertiesProxy(proxy_bus_, path, service);
+}
+
 DBusObjectManagerProxyInterface*
     ChromeosDBusControl::CreateDBusObjectManagerProxy(
         const string& path,
diff --git a/dbus/chromeos_dbus_control.h b/dbus/chromeos_dbus_control.h
index f2f31d9..f7992ed 100644
--- a/dbus/chromeos_dbus_control.h
+++ b/dbus/chromeos_dbus_control.h
@@ -40,10 +40,6 @@
       const std::string& connection_name,
       const base::Closure& on_connection_vanished) override;
 
-  DBusPropertiesProxyInterface* CreateDBusPropertiesProxy(
-      const std::string& path,
-      const std::string& service) override;
-
   DBusServiceProxyInterface* CreateDBusServiceProxy() override;
 
   // The caller retains ownership of 'delegate'.  It must not be deleted before
@@ -83,6 +79,10 @@
   PermissionBrokerProxyInterface* CreatePermissionBrokerProxy() override;
 
 #if !defined(DISABLE_CELLULAR)
+  DBusPropertiesProxyInterface* CreateDBusPropertiesProxy(
+      const std::string& path,
+      const std::string& service) override;
+
   DBusObjectManagerProxyInterface* CreateDBusObjectManagerProxy(
       const std::string& path,
       const std::string& service,
diff --git a/mock_control.h b/mock_control.h
index cfb9c10..3155143 100644
--- a/mock_control.h
+++ b/mock_control.h
@@ -39,9 +39,6 @@
                    const std::string& connection_name,
                    const base::Closure& on_connection_vanished));
 
-  MOCK_METHOD2(CreateDBusPropertiesProxy,
-               DBusPropertiesProxyInterface*(const std::string& path,
-                                             const std::string& service));
   MOCK_METHOD0(CreateDBusServiceProxy, DBusServiceProxyInterface*());
   MOCK_METHOD3(
       CreatePowerManagerProxy,
@@ -77,6 +74,9 @@
   MOCK_METHOD0(CreatePermissionBrokerProxy, PermissionBrokerProxyInterface*());
 
 #if !defined(DISABLE_CELLULAR)
+  MOCK_METHOD2(CreateDBusPropertiesProxy,
+               DBusPropertiesProxyInterface*(const std::string& path,
+                                             const std::string& service));
 
   MOCK_METHOD4(CreateDBusObjectManagerProxy,
                DBusObjectManagerProxyInterface*(
@@ -125,11 +125,9 @@
   MOCK_METHOD2(CreateSimProxy,
                mm1::SimProxyInterface*(const std::string& path,
                                        const std::string& service));
-
 #endif  // DISABLE_CELLULAR
 
 #if !defined(DISABLE_WIMAX)
-
   MOCK_METHOD1(CreateWiMaxDeviceProxy,
                WiMaxDeviceProxyInterface*(const std::string& path));
   MOCK_METHOD2(CreateWiMaxManagerProxy,
@@ -138,7 +136,6 @@
                    const base::Closure& service_vanished_callback));
   MOCK_METHOD1(CreateWiMaxNetworkProxy,
                WiMaxNetworkProxyInterface*(const std::string& path));
-
 #endif  // DISABLE_WIMAX
 
  private:
diff --git a/nice_mock_control.h b/nice_mock_control.h
index 28224df..621197e 100644
--- a/nice_mock_control.h
+++ b/nice_mock_control.h
@@ -39,9 +39,6 @@
                    const std::string& connection_name,
                    const base::Closure& on_connection_vanished));
 
-  MOCK_METHOD2(CreateDBusPropertiesProxy,
-               DBusPropertiesProxyInterface*(const std::string& path,
-                                             const std::string& service));
   MOCK_METHOD0(CreateDBusServiceProxy, DBusServiceProxyInterface*());
   MOCK_METHOD3(
       CreatePowerManagerProxy,
@@ -77,6 +74,9 @@
   MOCK_METHOD0(CreatePermissionBrokerProxy, PermissionBrokerProxyInterface*());
 
 #if !defined(DISABLE_CELLULAR)
+  MOCK_METHOD2(CreateDBusPropertiesProxy,
+               DBusPropertiesProxyInterface*(const std::string& path,
+                                             const std::string& service));
 
   MOCK_METHOD4(CreateDBusObjectManagerProxy,
                DBusObjectManagerProxyInterface*(
@@ -125,11 +125,9 @@
   MOCK_METHOD2(CreateSimProxy,
                mm1::SimProxyInterface*(const std::string& path,
                                        const std::string& service));
-
 #endif  // DISABLE_CELLULAR
 
 #if !defined(DISABLE_WIMAX)
-
   MOCK_METHOD1(CreateWiMaxDeviceProxy,
                WiMaxDeviceProxyInterface*(const std::string& path));
   MOCK_METHOD2(CreateWiMaxManagerProxy,
@@ -138,7 +136,6 @@
                    const base::Closure& service_vanished_callback));
   MOCK_METHOD1(CreateWiMaxNetworkProxy,
                WiMaxNetworkProxyInterface*(const std::string& path));
-
 #endif  // DISABLE_WIMAX
 
  private: