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

Unified Diff: dbus/object_manager.h

Issue 2239123002: dbus: Make Bus::GetManagedObjects skip unavailable services. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove call to WaitForServiceToBeAvailable Created 4 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/mock_object_manager.h ('k') | dbus/object_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/object_manager.h
diff --git a/dbus/object_manager.h b/dbus/object_manager.h
index 266b53eb9a0ac3d140d468114701af3ecad17ba9..842a1378a260c25aa5101985671ba8ee3336c340 100644
--- a/dbus/object_manager.h
+++ b/dbus/object_manager.h
@@ -71,8 +71,9 @@
// object_manager_->UnregisterInterface(kInterface);
// }
//
-// The D-Bus thread manager takes care of issuing the necessary call to
-// GetManagedObjects() after the implementation classes have been set up.
+// This class calls GetManagedObjects() asynchronously after the remote service
+// becomes available and additionally refreshes managed objects after the
+// service stops or restarts.
//
// The object manager interface class has one abstract method that must be
// implemented by the class to create Properties structures on demand. As well
@@ -238,17 +239,14 @@ public:
private:
friend class base::RefCountedThreadSafe<ObjectManager>;
- // Connects the InterfacesAdded and InterfacesRemoved signals and calls
- // GetManagedObjects. Called from OnSetupMatchRuleAndFilterComplete.
- void InitializeObjects();
-
// Called from the constructor to add a match rule for PropertiesChanged
- // signals on the DBus thread and set up a corresponding filter function.
+ // signals on the D-Bus thread and set up a corresponding filter function.
bool SetupMatchRuleAndFilter();
// Called on the origin thread once the match rule and filter have been set
- // up. |success| is false, if an error occurred during set up; it's true
- // otherwise.
+ // up. Connects the InterfacesAdded and InterfacesRemoved signals and
+ // refreshes objects if the service is available. |success| is false if an
+ // error occurred during setup and true otherwise.
void OnSetupMatchRuleAndFilterComplete(bool success);
// Called by dbus:: when a message is received. This is used to filter
« no previous file with comments | « dbus/mock_object_manager.h ('k') | dbus/object_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698