buffet: Make ExportedPropertySet threadsafe
In Chrome, we have both a DBus thread and some main thread (an 'origin'
thread). Objects related to DBus functionality need to accomodate this
so that we can send this upstream. This mostly just means that we need
to add assertions that developers are using the API correctly, so that
the use of weak pointers is safe.
BUG=chromium:360831
TEST=Unittests pass. buffet_BasicDBusAPI still passes.
Change-Id: Ibb48a5e65c7cb02e5edce9cbf85432bed70d7686
Reviewed-on: https://chromium-review.googlesource.com/193505
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/dbus_utils.h b/buffet/dbus_utils.h
index dea6d02..d4d5799 100644
--- a/buffet/dbus_utils.h
+++ b/buffet/dbus_utils.h
@@ -8,6 +8,7 @@
#include <string>
#include <base/memory/scoped_ptr.h>
+#include <dbus/exported_object.h>
#include <dbus/message.h>
namespace buffet {
@@ -17,6 +18,9 @@
scoped_ptr<dbus::Response> GetBadArgsError(dbus::MethodCall* method_call,
const std::string& message);
+dbus::ExportedObject::MethodCallCallback GetExportableDBusMethod(
+ base::Callback<scoped_ptr<dbus::Response>(dbus::MethodCall*)> handler);
+
} // namespace dbus_utils
} // namespace buffet