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

Unified Diff: dbus/object_proxy.cc

Issue 2239123002: dbus: Make Bus::GetManagedObjects skip unavailable services. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/object_proxy.cc
diff --git a/dbus/object_proxy.cc b/dbus/object_proxy.cc
index 5d9d8e842f0a43b2aad95c778d4c8141f47bf0fc..577a609ea91c55f97998d7d37861cdc541ad8f90 100644
--- a/dbus/object_proxy.cc
+++ b/dbus/object_proxy.cc
@@ -208,6 +208,10 @@ void ObjectProxy::WaitForServiceToBeAvailable(
base::Bind(&ObjectProxy::WaitForServiceToBeAvailableInternal, this));
}
+bool ObjectProxy::ServiceIsAvailable() {
+ return !service_name_owner_.empty();
hashimoto 2016/08/15 07:23:22 This member should be accessed only on the D-Bus t
+}
+
void ObjectProxy::Detach() {
bus_->AssertOnDBusThread();
@@ -449,7 +453,7 @@ void ObjectProxy::WaitForServiceToBeAvailableInternal() {
return;
}
- const bool service_is_available = !service_name_owner_.empty();
+ const bool service_is_available = ServiceIsAvailable();
if (service_is_available) { // Service is already available.
bus_->GetOriginTaskRunner()->PostTask(
FROM_HERE,
« no previous file with comments | « dbus/object_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698