Index: dbus/test_service.cc |
diff --git a/dbus/test_service.cc b/dbus/test_service.cc |
index ee1befb630a3766c21cd86fa8d2de3f7873590ac..87c6e01ba704d590b9c2ec558d8e06ed78027250 100644 |
--- a/dbus/test_service.cc |
+++ b/dbus/test_service.cc |
@@ -103,6 +103,19 @@ void TestService::SendTestSignalFromRootInternal(const std::string& message) { |
root_object->SendSignal(&signal); |
} |
+void TestService::RequestOwnership() { |
+ message_loop()->PostTask( |
+ FROM_HERE, |
+ base::Bind(&TestService::RequestOwnershipInternal, |
+ base::Unretained(this))); |
+} |
+ |
+void TestService::RequestOwnershipInternal() { |
+ bus_->RequestOwnership("org.chromium.TestService", |
+ base::Bind(&TestService::OnOwnership, |
+ base::Unretained(this))); |
+} |
+ |
void TestService::OnOwnership(const std::string& service_name, |
bool success) { |
LOG_IF(ERROR, !success) << "Failed to own: " << service_name; |