Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Unified Diff: dbus/property.cc

Issue 1361503003: libchrome: add support for synchronous PropertySet::Set to dbus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dbus/property.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/property.cc
diff --git a/dbus/property.cc b/dbus/property.cc
index dde061118bb8dc376f8818e188862c12a000dd31..b7a0c8be458bef4c5c0e35a4e2a3337e98658fab 100644
--- a/dbus/property.cc
+++ b/dbus/property.cc
@@ -174,6 +174,22 @@ void PropertySet::Set(PropertyBase* property, SetCallback callback) {
callback));
}
+bool PropertySet::SetAndBlock(PropertyBase* property) {
+ MethodCall method_call(kPropertiesInterface, kPropertiesSet);
+ MessageWriter writer(&method_call);
+ writer.AppendString(interface());
+ writer.AppendString(property->name());
+ property->AppendSetValueToWriter(&writer);
+
+ DCHECK(object_proxy_);
+ scoped_ptr<dbus::Response> response(
+ object_proxy_->CallMethodAndBlock(&method_call,
+ ObjectProxy::TIMEOUT_USE_DEFAULT));
+ if (response.get())
+ return true;
+ return false;
+}
+
void PropertySet::OnSet(PropertyBase* property,
SetCallback callback,
Response* response) {
« no previous file with comments | « dbus/property.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698