debugd: switch from dbus-c++ to chromeos-dbus-bindings
This allows us to remove a major user of dbus-c++, which does
not play nicely with chrome code, as it uses exceptions. It
also uses non-const references for multiple return values and
errors which is strictly disallowed. This also allows us to use
the libchrome message loop.
Most of this is a replacement of types:
* DBus::Connection -> dbus::Bus
* DBus::Error -> brillo::ErrorPtr
* DBus::FileDescriptor -> dbus::FileDescriptor
* std::map<std::string, DBus::Variant> -> brillo::VariantDictionary
as well as use of libchrome dbus objects where debugd calls out
to other D-Bus services.
CQ-DEPEND=CL:495412
BUG=chromium:705051
TEST=emerge, unit tests, autotests, deploy and use from crosh
Change-Id: I5a7d34be6eec5f88949551dde2f02110b8c90487
Reviewed-on: https://chromium-review.googlesource.com/490830
Commit-Ready: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>
diff --git a/debugd/src/process_with_output.h b/debugd/src/process_with_output.h
index 6738ef3..167771d 100644
--- a/debugd/src/process_with_output.h
+++ b/debugd/src/process_with_output.h
@@ -10,7 +10,7 @@
#include <base/files/file_path.h>
#include <base/files/scoped_file.h>
-#include <dbus-c++/error.h>
+#include <brillo/errors/error.h>
#include "debugd/src/sandboxed_process.h"
@@ -62,7 +62,7 @@
const std::string* stdin,
std::string* stdout,
std::string* stderr,
- DBus::Error* error);
+ brillo::ErrorPtr* error);
// Like RunProcess() but to run helper programs. |helper| should be specified
// relative to the helpers/ directory.
@@ -72,7 +72,7 @@
const std::string* stdin,
std::string* stdout,
std::string* stderr,
- DBus::Error* error);
+ brillo::ErrorPtr* error);
// Like RunProcess() but from within helper programs. This function will
// not use minijail0 or any sandboxing (since helper programs should already
@@ -94,7 +94,7 @@
const std::string* stdin,
std::string* stdout,
std::string* stderr,
- DBus::Error* error,
+ brillo::ErrorPtr* error,
ProcessWithOutput* process);
};