shill: decouple daemon interface and its service exporter

Provide a basic abstraction for shill's daemon interface, without
any dependency for the underlying MessageLoop and technology use to
expose its services.

Implement a DBus daemon using chromeos::DBusServiceDaemon to expose
shill's services through DBus.  The message loop (MessageLoopForIO)
is encapsulated in the daemon.  So we will need to remove the message
loop dependency in shill (EventDispatcher) when this code becomes active.

BUG=chromium:505477
TEST=USE="chromeos_dbus asan clang" FEATURES=test emerge-$BOARD shill

Change-Id: Iccfc6bb4dc11654d9b673a2f1307f0e98f031fb4
Reviewed-on: https://chromium-review.googlesource.com/282655
Reviewed-by: Zeping Qiu <zqiu@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
diff --git a/shill.gyp b/shill.gyp
index dfb9216..061a6bd 100644
--- a/shill.gyp
+++ b/shill.gyp
@@ -308,8 +308,13 @@
         }],
         ['USE_chromeos_dbus ==1', {
           'sources': [
-            'dbus/chromeos_dbus_control.cc',
+            # TODO(zqiu): putting "chromeos_daemon.cc" here temporarily until
+            # the legacy shill_daemon.cc is removed. This is a replacement for
+            # shill_daemon.
+            'chromeos_daemon.cc',
             'dbus/chromeos_dbus_adaptor.cc',
+            'dbus/chromeos_dbus_control.cc',
+            'dbus/chromeos_dbus_daemon.cc',
             'dbus/chromeos_device_dbus_adaptor.cc',
           ],
         }],
@@ -796,6 +801,10 @@
             }],
             ['USE_chromeos_dbus ==1', {
               'sources': [
+                # TODO(zqiu): putting "chromeos_daemon_unittest.cc" here
+                # temporarily until the legacy shill_daemon.cc is removed.
+                # This is a replacement for shill_daemon.
+                'chromeos_daemon_unittest.cc',
                 'dbus/chromeos_dbus_adaptor_unittest.cc',
               ],
             }],