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

Unified Diff: dbus/test_service.h

Issue 177703006: dbus: Handle NameOwnerChanged in ObjectManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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/object_manager_unittest.cc ('k') | dbus/test_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/test_service.h
diff --git a/dbus/test_service.h b/dbus/test_service.h
index 197b8d2829adf0b2d85f14cb1457504f0864b8c5..523864cafd0ffb09b0fde66ebc1f1e4cbde79a49 100644
--- a/dbus/test_service.h
+++ b/dbus/test_service.h
@@ -74,6 +74,10 @@ class TestService : public base::Thread {
// completed.
void RequestOwnership(base::Callback<void(bool)> callback);
+ // Release the ownership of the well-known name "TestService".
+ // |callback| will be called when the ownership has been released.
+ void ReleaseOwnership(base::Closure callback);
+
// Returns whether this instance has the name ownership or not.
bool has_ownership() const { return has_ownership_; }
@@ -166,6 +170,25 @@ class TestService : public base::Thread {
// Helper function for RequestOwnership().
void RequestOwnershipInternal(base::Callback<void(bool)> callback);
+ // Helper function for ReleaseOwnership().
+ void ReleaseOwnershipInternal(base::Closure callback);
+
+ // Sends the response on completion of the performed action.
+ void PerformActionResponse(
+ MethodCall* method_call,
+ dbus::ExportedObject::ResponseSender response_sender);
+
+ // Re-requests ownership of the well-known name after releasing it.
+ void OwnershipReleased(
+ MethodCall* method_call,
+ dbus::ExportedObject::ResponseSender response_sender);
+
+ // Sends the action response after regaining the well-known name.
+ void OwnershipRegained(
+ MethodCall* method_call,
+ dbus::ExportedObject::ResponseSender response_sender,
+ bool success);
+
// Options to use when requesting service ownership.
Bus::ServiceOwnershipOptions request_ownership_options_;
« no previous file with comments | « dbus/object_manager_unittest.cc ('k') | dbus/test_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698