Use installed DBus libraries instead of generating them.

login_manager, power_manager, debugd and shill now expose a client
library with the generated dbus-proxies.h file and the system_api's
installed dbus-constants.h. This patch changes update_engine from
generating these DBus headers to use the installed client libraries.

The client libraries already include the service path string, so we
don't need to include system_api dbus-constants.h in most cases, unless
we actually use some parameter constants defined there.

BUG=b:23084776,b:23560718
TEST=./build_packages --board=link

Change-Id: Idb4501e784ebb5928c92902d114462be57d5826a
diff --git a/connection_manager.cc b/connection_manager.cc
index 2589a4a..99dbcb1 100644
--- a/connection_manager.cc
+++ b/connection_manager.cc
@@ -21,10 +21,10 @@
 
 #include <base/stl_util.h>
 #include <base/strings/string_util.h>
-#include <chromeos/dbus/service_constants.h>
 #include <policy/device_policy.h>
+#include <shill/dbus-constants.h>
+#include <shill/dbus-proxies.h>
 
-#include "shill/dbus-proxies.h"
 #include "update_engine/prefs.h"
 #include "update_engine/system_state.h"
 #include "update_engine/utils.h"
diff --git a/connection_manager_unittest.cc b/connection_manager_unittest.cc
index b799e65..ba4ad9a 100644
--- a/connection_manager_unittest.cc
+++ b/connection_manager_unittest.cc
@@ -21,15 +21,15 @@
 
 #include <base/logging.h>
 #include <chromeos/any.h>
-#include <chromeos/dbus/service_constants.h>
 #include <chromeos/make_unique_ptr.h>
 #include <chromeos/message_loops/fake_message_loop.h>
 #include <chromeos/variant_dictionary.h>
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
+#include <shill/dbus-constants.h>
+#include <shill/dbus-proxies.h>
+#include <shill/dbus-proxy-mocks.h>
 
-#include "shill/dbus-proxies.h"
-#include "shill/dbus-proxy-mocks.h"
 #include "update_engine/fake_shill_proxy.h"
 #include "update_engine/fake_system_state.h"
 #include "update_engine/test_utils.h"
diff --git a/dbus_bindings/org.chromium.UpdateEngineInterface.dbus-xml b/dbus_bindings/org.chromium.UpdateEngineInterface.dbus-xml
index a632608..deacabd 100644
--- a/dbus_bindings/org.chromium.UpdateEngineInterface.dbus-xml
+++ b/dbus_bindings/org.chromium.UpdateEngineInterface.dbus-xml
@@ -16,7 +16,7 @@
     <method name="AttemptUpdateWithFlags">
       <arg type="s" name="app_version" direction="in" />
       <arg type="s" name="omaha_url" direction="in" />
-      <!-- See AttemptUpdateFlags enum in dbus_constants.h. -->
+      <!-- See AttemptUpdateFlags enum in update_engine/dbus-constants.h. -->
       <arg type="i" name="flags" direction="in" />
     </method>
     <method name="AttemptRollback">
diff --git a/dbus_constants.h b/dbus_constants.h
index e048b8b..e9b66ab 100644
--- a/dbus_constants.h
+++ b/dbus_constants.h
@@ -17,6 +17,9 @@
 #ifndef UPDATE_ENGINE_DBUS_CONSTANTS_H_
 #define UPDATE_ENGINE_DBUS_CONSTANTS_H_
 
+// TODO(deymo): Remove this file once all clients use "dbus-constants.h"
+// instead. We need to remove it from the ebuild as well.
+
 namespace chromeos_update_engine {
 
 static const char* const kUpdateEngineServiceName = "org.chromium.UpdateEngine";
diff --git a/dbus_service.cc b/dbus_service.cc
index 7bf8a69..9f6a844 100644
--- a/dbus_service.cc
+++ b/dbus_service.cc
@@ -26,10 +26,10 @@
 #include <chromeos/message_loops/message_loop.h>
 #include <chromeos/strings/string_utils.h>
 #include <policy/device_policy.h>
+#include <update_engine/dbus-constants.h>
 
 #include "update_engine/clock_interface.h"
 #include "update_engine/connection_manager_interface.h"
-#include "update_engine/dbus_constants.h"
 #include "update_engine/hardware_interface.h"
 #include "update_engine/omaha_request_params.h"
 #include "update_engine/p2p_manager.h"
@@ -40,10 +40,10 @@
 using base::StringPrintf;
 using chromeos::ErrorPtr;
 using chromeos::string_utils::ToString;
-using chromeos_update_engine::AttemptUpdateFlags;
-using chromeos_update_engine::kAttemptUpdateFlagNonInteractive;
 using std::set;
 using std::string;
+using update_engine::AttemptUpdateFlags;
+using update_engine::kAttemptUpdateFlagNonInteractive;
 
 namespace {
 // Log and set the error on the passed ErrorPtr.
@@ -53,7 +53,7 @@
   chromeos::Error::AddTo(
       error, location,
       chromeos::errors::dbus::kDomain,
-      chromeos_update_engine::kUpdateEngineServiceErrorFailed, reason);
+      update_engine::kUpdateEngineServiceErrorFailed, reason);
   LOG(ERROR) << "Sending DBus Failure: " << location.ToString() << ": "
              << reason;
 }
@@ -337,7 +337,9 @@
     : org::chromium::UpdateEngineInterfaceAdaptor(&dbus_service_),
     bus_(bus),
     dbus_service_(system_state),
-    dbus_object_(nullptr, bus, dbus::ObjectPath(kUpdateEngineServicePath)) {}
+    dbus_object_(nullptr,
+                 bus,
+                 dbus::ObjectPath(update_engine::kUpdateEngineServicePath)) {}
 
 void UpdateEngineAdaptor::RegisterAsync(
     const base::Callback<void(bool)>& completion_callback) {
@@ -346,7 +348,7 @@
 }
 
 bool UpdateEngineAdaptor::RequestOwnership() {
-  return bus_->RequestOwnershipAndBlock(kUpdateEngineServiceName,
+  return bus_->RequestOwnershipAndBlock(update_engine::kUpdateEngineServiceName,
                                         dbus::Bus::REQUIRE_PRIMARY);
 }
 
diff --git a/dbus_service_unittest.cc b/dbus_service_unittest.cc
index a00cd37..824ea71 100644
--- a/dbus_service_unittest.cc
+++ b/dbus_service_unittest.cc
@@ -22,16 +22,16 @@
 #include <chromeos/errors/error.h>
 #include <policy/libpolicy.h>
 #include <policy/mock_device_policy.h>
+#include <update_engine/dbus-constants.h>
 
-#include "update_engine/dbus_constants.h"
 #include "update_engine/fake_system_state.h"
 
+using chromeos::errors::dbus::kDomain;
 using std::string;
 using testing::Return;
 using testing::SetArgumentPointee;
 using testing::_;
-
-using chromeos::errors::dbus::kDomain;
+using update_engine::kUpdateEngineServiceErrorFailed;
 
 namespace chromeos_update_engine {
 
@@ -69,7 +69,8 @@
       "app_ver", "url", false /* interactive */));
   // The update is non-interactive when we pass the non-interactive flag.
   EXPECT_TRUE(dbus_service_.AttemptUpdateWithFlags(
-      &error_, "app_ver", "url", kAttemptUpdateFlagNonInteractive));
+      &error_, "app_ver", "url",
+      update_engine::kAttemptUpdateFlagNonInteractive));
   EXPECT_EQ(nullptr, error_);
 }
 
diff --git a/fake_shill_proxy.h b/fake_shill_proxy.h
index 4feb2b8..8daf7c2 100644
--- a/fake_shill_proxy.h
+++ b/fake_shill_proxy.h
@@ -22,9 +22,9 @@
 #include <string>
 
 #include <base/macros.h>
+#include <shill/dbus-proxies.h>
+#include <shill/dbus-proxy-mocks.h>
 
-#include "shill/dbus-proxies.h"
-#include "shill/dbus-proxy-mocks.h"
 #include "update_engine/shill_proxy_interface.h"
 
 namespace chromeos_update_engine {
diff --git a/fake_system_state.h b/fake_system_state.h
index 30ba7e9..ce283df 100644
--- a/fake_system_state.h
+++ b/fake_system_state.h
@@ -20,10 +20,10 @@
 #include <base/logging.h>
 #include <gmock/gmock.h>
 #include <policy/mock_device_policy.h>
+#include <power_manager/dbus-proxies.h>
+#include <power_manager/dbus-proxy-mocks.h>
 
 #include "metrics/metrics_library_mock.h"
-#include "power_manager/dbus-proxies.h"
-#include "power_manager/dbus-proxy-mocks.h"
 #include "update_engine/fake_boot_control.h"
 #include "update_engine/fake_clock.h"
 #include "update_engine/fake_hardware.h"
diff --git a/omaha_request_action_unittest.cc b/omaha_request_action_unittest.cc
index 1215084..f22c137 100644
--- a/omaha_request_action_unittest.cc
+++ b/omaha_request_action_unittest.cc
@@ -27,7 +27,6 @@
 #include <base/strings/stringprintf.h>
 #include <base/time/time.h>
 #include <chromeos/bind_lambda.h>
-#include <chromeos/dbus/service_constants.h>
 #include <chromeos/message_loops/fake_message_loop.h>
 #include <chromeos/message_loops/message_loop.h>
 #include <chromeos/message_loops/message_loop_utils.h>
diff --git a/real_system_state.cc b/real_system_state.cc
index 5477dd6..c89f297 100644
--- a/real_system_state.cc
+++ b/real_system_state.cc
@@ -18,7 +18,6 @@
 
 #include <base/files/file_util.h>
 #include <base/time/time.h>
-#include <chromeos/dbus/service_constants.h>
 
 #include "update_engine/boot_control_chromeos.h"
 #include "update_engine/constants.h"
@@ -28,9 +27,9 @@
 namespace chromeos_update_engine {
 
 RealSystemState::RealSystemState(const scoped_refptr<dbus::Bus>& bus)
-    : debugd_proxy_(bus, debugd::kDebugdServiceName),
-      power_manager_proxy_(bus, power_manager::kPowerManagerServiceName),
-      session_manager_proxy_(bus, login_manager::kSessionManagerServiceName),
+    : debugd_proxy_(bus),
+      power_manager_proxy_(bus),
+      session_manager_proxy_(bus),
       shill_proxy_(bus),
       libcros_proxy_(bus) {
 }
diff --git a/real_system_state.h b/real_system_state.h
index a51e6ef..31cf4da 100644
--- a/real_system_state.h
+++ b/real_system_state.h
@@ -21,12 +21,12 @@
 
 #include <memory>
 
+#include <debugd/dbus-proxies.h>
 #include <metrics/metrics_library.h>
 #include <policy/device_policy.h>
+#include <power_manager/dbus-proxies.h>
+#include <session_manager/dbus-proxies.h>
 
-#include "debugd/dbus-proxies.h"
-#include "login_manager/dbus-proxies.h"
-#include "power_manager/dbus-proxies.h"
 #include "update_engine/boot_control_interface.h"
 #include "update_engine/clock.h"
 #include "update_engine/connection_manager.h"
diff --git a/shill_proxy.cc b/shill_proxy.cc
index caa68b3..99817ea 100644
--- a/shill_proxy.cc
+++ b/shill_proxy.cc
@@ -16,9 +16,6 @@
 
 #include "update_engine/shill_proxy.h"
 
-#include <chromeos/dbus/service_constants.h>
-
-
 using org::chromium::flimflam::ManagerProxy;
 using org::chromium::flimflam::ManagerProxyInterface;
 using org::chromium::flimflam::ServiceProxy;
@@ -29,10 +26,7 @@
 ShillProxy::ShillProxy(const scoped_refptr<dbus::Bus>& bus) : bus_(bus) {}
 
 bool ShillProxy::Init() {
-  manager_proxy_.reset(
-      new ManagerProxy(bus_,
-                       shill::kFlimflamServiceName,
-                       dbus::ObjectPath(shill::kFlimflamServicePath)));
+  manager_proxy_.reset(new ManagerProxy(bus_));
   return true;
 }
 
@@ -43,8 +37,8 @@
 std::unique_ptr<ServiceProxyInterface> ShillProxy::GetServiceForPath(
     const std::string& path) {
   DCHECK(bus_.get());
-  return std::unique_ptr<ServiceProxyInterface>(new ServiceProxy(
-      bus_, shill::kFlimflamServiceName, dbus::ObjectPath(path)));
+  return std::unique_ptr<ServiceProxyInterface>(
+      new ServiceProxy(bus_, dbus::ObjectPath(path)));
 }
 
 }  // namespace chromeos_update_engine
diff --git a/shill_proxy.h b/shill_proxy.h
index 3e62793..1fbcd2b 100644
--- a/shill_proxy.h
+++ b/shill_proxy.h
@@ -22,8 +22,8 @@
 
 #include <base/macros.h>
 #include <dbus/bus.h>
+#include <shill/dbus-proxies.h>
 
-#include "shill/dbus-proxies.h"
 #include "update_engine/shill_proxy_interface.h"
 
 namespace chromeos_update_engine {
diff --git a/shill_proxy_interface.h b/shill_proxy_interface.h
index 5eb7701..0092f12 100644
--- a/shill_proxy_interface.h
+++ b/shill_proxy_interface.h
@@ -21,8 +21,7 @@
 #include <string>
 
 #include <base/macros.h>
-
-#include "shill/dbus-proxies.h"
+#include <shill/dbus-proxies.h>
 
 namespace chromeos_update_engine {
 
diff --git a/system_state.h b/system_state.h
index 0190ee2..15350bf 100644
--- a/system_state.h
+++ b/system_state.h
@@ -17,7 +17,7 @@
 #ifndef UPDATE_ENGINE_SYSTEM_STATE_H_
 #define UPDATE_ENGINE_SYSTEM_STATE_H_
 
-#include "power_manager/dbus-proxies.h"
+#include <power_manager/dbus-proxies.h>
 
 class MetricsLibraryInterface;
 
diff --git a/update_attempter.cc b/update_attempter.cc
index 82831e4..76aaf39 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -32,14 +32,15 @@
 #include <base/strings/string_util.h>
 #include <base/strings/stringprintf.h>
 #include <chromeos/bind_lambda.h>
-#include <chromeos/dbus/service_constants.h>
 #include <chromeos/message_loops/message_loop.h>
-
+#include <debugd/dbus-constants.h>
 #include <metrics/metrics_library.h>
 #include <policy/device_policy.h>
 #include <policy/libpolicy.h>
+#include <power_manager/dbus-constants.h>
+#include <power_manager/dbus-proxies.h>
+#include <update_engine/dbus-constants.h>
 
-#include "power_manager/dbus-proxies.h"
 #include "update_engine/certificate_checker.h"
 #include "update_engine/clock_interface.h"
 #include "update_engine/constants.h"
diff --git a/update_attempter_unittest.cc b/update_attempter_unittest.cc
index 546dd03..4e48d0b 100644
--- a/update_attempter_unittest.cc
+++ b/update_attempter_unittest.cc
@@ -23,17 +23,17 @@
 #include <base/files/file_util.h>
 #include <base/message_loop/message_loop.h>
 #include <chromeos/bind_lambda.h>
-#include <chromeos/dbus/service_constants.h>
 #include <chromeos/make_unique_ptr.h>
 #include <chromeos/message_loops/base_message_loop.h>
 #include <chromeos/message_loops/message_loop.h>
 #include <chromeos/message_loops/message_loop_utils.h>
+#include <debugd/dbus-constants.h>
+#include <debugd/dbus-proxies.h>
+#include <debugd/dbus-proxy-mocks.h>
 #include <gtest/gtest.h>
 #include <policy/libpolicy.h>
 #include <policy/mock_device_policy.h>
 
-#include "debugd/dbus-proxies.h"
-#include "debugd/dbus-proxy-mocks.h"
 #include "libcros/dbus-proxies.h"
 #include "libcros/dbus-proxy-mocks.h"
 #include "update_engine/fake_clock.h"
diff --git a/update_engine.gyp b/update_engine.gyp
index e0df1e9..339c45e 100644
--- a/update_engine.gyp
+++ b/update_engine.gyp
@@ -96,51 +96,6 @@
       'type': 'none',
       'actions': [
         {
-          'action_name': 'update_engine-dbus-shill-client',
-          'variables': {
-            'mock_output_file': 'include/shill/dbus-proxy-mocks.h',
-            'proxy_output_file': 'include/shill/dbus-proxies.h'
-          },
-          'sources': [
-            '<(platform2_root)/shill/dbus_bindings/org.chromium.flimflam.Manager.xml',
-            '<(platform2_root)/shill/dbus_bindings/org.chromium.flimflam.Service.xml',
-          ],
-          'includes': ['../../../platform2/common-mk/generate-dbus-proxies.gypi'],
-        },
-        {
-          'action_name': 'update_engine-dbus-debugd-client',
-          'variables': {
-            'mock_output_file': 'include/debugd/dbus-proxy-mocks.h',
-            'proxy_output_file': 'include/debugd/dbus-proxies.h'
-          },
-          'sources': [
-            '<(platform2_root)/debugd/share/org.chromium.debugd.xml',
-          ],
-          'includes': ['../../../platform2/common-mk/generate-dbus-proxies.gypi'],
-        },
-        {
-          'action_name': 'update_engine-dbus-login_manager-client',
-          'variables': {
-            'mock_output_file': 'include/login_manager/dbus-proxy-mocks.h',
-            'proxy_output_file': 'include/login_manager/dbus-proxies.h'
-          },
-          'sources': [
-            '<(platform2_root)/login_manager/org.chromium.SessionManagerInterface.xml',
-          ],
-          'includes': ['../../../platform2/common-mk/generate-dbus-proxies.gypi'],
-        },
-        {
-          'action_name': 'update_engine-dbus-power_manager-client',
-          'variables': {
-            'mock_output_file': 'include/power_manager/dbus-proxy-mocks.h',
-            'proxy_output_file': 'include/power_manager/dbus-proxies.h'
-          },
-          'sources': [
-            '<(platform2_root)/power_manager/dbus_bindings/org.chromium.PowerManager.xml',
-          ],
-          'includes': ['../../../platform2/common-mk/generate-dbus-proxies.gypi'],
-        },
-        {
           'action_name': 'update_engine-dbus-libcros-client',
           'variables': {
             'mock_output_file': 'include/libcros/dbus-proxy-mocks.h',
@@ -169,9 +124,14 @@
           'libchromeos-<(libbase_ver)',
           'libcrypto',
           'libcurl',
+          'libdebugd-client',
+          'libsession_manager-client',
           'libmetrics-<(libbase_ver)',
+          'libpower_manager-client',
+          'libupdate_engine-client',
+          'libshill-client',
           'libssl',
-          'expat'
+          'expat',
         ],
         'deps': ['<@(exported_deps)'],
       },
@@ -182,6 +142,13 @@
           ],
         },
       },
+      'include_dirs': [
+        # We include the update_engine/dbus-constants from the
+        # libupdate_engine-client library path. The file is installed by
+        # system_api, but it is technically part of the library we are
+        # generating but didn't install yet.
+        '<(sysroot)/usr/include/update_engine-client',
+      ],
       'link_settings': {
         'variables': {
           'deps': [
@@ -283,54 +250,23 @@
     {
       'target_name': 'update_engine_client',
       'type': 'executable',
-      'dependencies': [
-        'libupdate_engine-client-headers',
-      ],
       'variables': {
         'exported_deps': [
-          'libchrome-<(libbase_ver)',
-          'libchromeos-<(libbase_ver)',
+          'libupdate_engine-client',
         ],
         'deps': ['<@(exported_deps)'],
       },
-      'link_settings': {
-        'variables': {
-          'deps': [
-            '<@(exported_deps)',
-          ],
-        },
-      },
       'sources': [
         'update_engine_client.cc',
       ],
     },
-    # update_engine client library generated headers. Used by other daemons and
-    # by the update_engine_client console program to interact with
-    # update_engine.
-    {
-      'target_name': 'libupdate_engine-client-headers',
-      'type': 'none',
-      'actions': [
-        {
-          'action_name': 'update_engine_client-dbus-proxies',
-          'variables': {
-            'dbus_service_config': 'dbus_bindings/dbus-service-config.json',
-            'proxy_output_file': 'include/update_engine/dbus-proxies.h',
-            'mock_output_file': 'include/update_engine/dbus-proxy-mocks.h',
-          },
-          'sources': [
-            'dbus_bindings/org.chromium.UpdateEngineInterface.dbus-xml',
-          ],
-          'includes': ['../../../platform2/common-mk/generate-dbus-proxies.gypi'],
-        },
-      ]
-    },
     # server-side code. This is used for delta_generator and unittests but not
     # for any client code.
     {
       'target_name': 'libpayload_generator',
       'type': 'static_library',
       'dependencies': [
+        'libupdate_engine',
         'update_metadata-protos',
       ],
       'variables': {
@@ -445,6 +381,10 @@
             'deps': [
               'libchromeos-test-<(libbase_ver)',
               'libchrome-test-<(libbase_ver)',
+              'libdebugd-client-test',
+              'libpower_manager-client-test',
+              'libsession_manager-client-test',
+              'libshill-client-test',
             ],
           },
           'dependencies': [
diff --git a/update_engine_client.cc b/update_engine_client.cc
index 6a88177..c6d4857 100644
--- a/update_engine_client.cc
+++ b/update_engine_client.cc
@@ -25,16 +25,14 @@
 #include <base/logging.h>
 #include <base/macros.h>
 #include <chromeos/daemons/dbus_daemon.h>
-#include <chromeos/dbus/service_constants.h>
 #include <chromeos/flag_helper.h>
 #include <dbus/bus.h>
+#include <update_engine/dbus-constants.h>
+#include <update_engine/dbus-proxies.h>
 
-#include "update_engine/dbus_constants.h"
-#include "update_engine/dbus-proxies.h"
-
-using chromeos_update_engine::kAttemptUpdateFlagNonInteractive;
-using chromeos_update_engine::kUpdateEngineServiceName;
 using std::string;
+using update_engine::kAttemptUpdateFlagNonInteractive;
+using update_engine::kUpdateEngineServiceName;
 
 namespace {
 
diff --git a/update_manager/real_device_policy_provider.cc b/update_manager/real_device_policy_provider.cc
index 5e9071d..f158e27 100644
--- a/update_manager/real_device_policy_provider.cc
+++ b/update_manager/real_device_policy_provider.cc
@@ -21,7 +21,6 @@
 #include <base/location.h>
 #include <base/logging.h>
 #include <base/time/time.h>
-#include <chromeos/dbus/service_constants.h>
 #include <policy/device_policy.h>
 
 #include "update_engine/update_manager/generic_variables.h"
diff --git a/update_manager/real_device_policy_provider.h b/update_manager/real_device_policy_provider.h
index 1553db3..2bb9cad 100644
--- a/update_manager/real_device_policy_provider.h
+++ b/update_manager/real_device_policy_provider.h
@@ -23,8 +23,8 @@
 #include <chromeos/message_loops/message_loop.h>
 #include <gtest/gtest_prod.h>  // for FRIEND_TEST
 #include <policy/libpolicy.h>
+#include <session_manager/dbus-proxies.h>
 
-#include "login_manager/dbus-proxies.h"
 #include "update_engine/update_manager/device_policy_provider.h"
 #include "update_engine/update_manager/generic_variables.h"
 
diff --git a/update_manager/real_device_policy_provider_unittest.cc b/update_manager/real_device_policy_provider_unittest.cc
index bd59589..93bf1bb 100644
--- a/update_manager/real_device_policy_provider_unittest.cc
+++ b/update_manager/real_device_policy_provider_unittest.cc
@@ -18,7 +18,6 @@
 
 #include <memory>
 
-#include <chromeos/dbus/service_constants.h>
 #include <chromeos/message_loops/fake_message_loop.h>
 #include <chromeos/message_loops/message_loop.h>
 #include <chromeos/message_loops/message_loop_utils.h>
@@ -26,9 +25,9 @@
 #include <gtest/gtest.h>
 #include <policy/mock_device_policy.h>
 #include <policy/mock_libpolicy.h>
+#include <session_manager/dbus-proxies.h>
+#include <session_manager/dbus-proxy-mocks.h>
 
-#include "login_manager/dbus-proxies.h"
-#include "login_manager/dbus-proxy-mocks.h"
 #include "update_engine/dbus_test_utils.h"
 #include "update_engine/test_utils.h"
 #include "update_engine/update_manager/umtest_utils.h"
diff --git a/update_manager/real_shill_provider.cc b/update_manager/real_shill_provider.cc
index 065eac3..e3fa8f9 100644
--- a/update_manager/real_shill_provider.cc
+++ b/update_manager/real_shill_provider.cc
@@ -20,9 +20,8 @@
 
 #include <base/logging.h>
 #include <base/strings/stringprintf.h>
-#include <chromeos/dbus/service_constants.h>
-
-#include "shill/dbus-proxies.h"
+#include <shill/dbus-constants.h>
+#include <shill/dbus-proxies.h>
 
 using org::chromium::flimflam::ManagerProxyInterface;
 using org::chromium::flimflam::ServiceProxyInterface;
diff --git a/update_manager/real_shill_provider_unittest.cc b/update_manager/real_shill_provider_unittest.cc
index 4ba2708..4b4d0a7 100644
--- a/update_manager/real_shill_provider_unittest.cc
+++ b/update_manager/real_shill_provider_unittest.cc
@@ -19,14 +19,14 @@
 #include <utility>
 
 #include <base/time/time.h>
-#include <chromeos/dbus/service_constants.h>
 #include <chromeos/make_unique_ptr.h>
 #include <chromeos/message_loops/fake_message_loop.h>
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
+#include <shill/dbus-constants.h>
+#include <shill/dbus-proxies.h>
+#include <shill/dbus-proxy-mocks.h>
 
-#include "shill/dbus-proxies.h"
-#include "shill/dbus-proxy-mocks.h"
 #include "update_engine/dbus_test_utils.h"
 #include "update_engine/fake_clock.h"
 #include "update_engine/fake_shill_proxy.h"
diff --git a/update_manager/real_updater_provider.cc b/update_manager/real_updater_provider.cc
index 6e297c8..14d60d2 100644
--- a/update_manager/real_updater_provider.cc
+++ b/update_manager/real_updater_provider.cc
@@ -23,7 +23,7 @@
 #include <base/bind.h>
 #include <base/strings/stringprintf.h>
 #include <base/time/time.h>
-#include <chromeos/dbus/service_constants.h>
+#include <update_engine/dbus-constants.h>
 
 #include "update_engine/clock_interface.h"
 #include "update_engine/omaha_request_params.h"
diff --git a/update_manager/real_updater_provider_unittest.cc b/update_manager/real_updater_provider_unittest.cc
index a8aec14..4187427 100644
--- a/update_manager/real_updater_provider_unittest.cc
+++ b/update_manager/real_updater_provider_unittest.cc
@@ -20,8 +20,8 @@
 #include <string>
 
 #include <base/time/time.h>
-#include <chromeos/dbus/service_constants.h>
 #include <gtest/gtest.h>
+#include <update_engine/dbus-constants.h>
 
 #include "update_engine/fake_clock.h"
 #include "update_engine/fake_system_state.h"
diff --git a/update_manager/state_factory.h b/update_manager/state_factory.h
index e39a74d..f15fd83 100644
--- a/update_manager/state_factory.h
+++ b/update_manager/state_factory.h
@@ -17,7 +17,8 @@
 #ifndef UPDATE_ENGINE_UPDATE_MANAGER_STATE_FACTORY_H_
 #define UPDATE_ENGINE_UPDATE_MANAGER_STATE_FACTORY_H_
 
-#include "login_manager/dbus-proxies.h"
+#include <session_manager/dbus-proxies.h>
+
 #include "update_engine/shill_proxy.h"
 #include "update_engine/system_state.h"
 #include "update_engine/update_manager/state.h"