Index: dbus/bus.cc |
diff --git a/dbus/bus.cc b/dbus/bus.cc |
index d0662171f2460cf0aa2bf3f51596239ae47a7b3c..5df3bb78f99412da52a309a5bc2d91404e669dca 100644 |
--- a/dbus/bus.cc |
+++ b/dbus/bus.cc |
@@ -218,7 +218,27 @@ ObjectProxy* Bus::GetObjectProxy(const std::string& service_name, |
} |
scoped_refptr<ObjectProxy> object_proxy = |
- new ObjectProxy(this, service_name, object_path); |
+ new ObjectProxy(this, service_name, object_path, |
+ ObjectProxy::LOG_SERVICE_UNKNOWN_ERRORS); |
+ object_proxy_table_[key] = object_proxy; |
+ |
+ return object_proxy.get(); |
+} |
+ |
+ObjectProxy* Bus::GetObjectProxyIgnoreUnknownService( |
+ const std::string& service_name, const std::string& object_path) { |
+ AssertOnOriginThread(); |
+ |
+ // Check if we already have the requested object proxy. |
+ const std::string key = service_name + object_path + "IGNORE_SERVICE_UNKNOWN"; |
+ ObjectProxyTable::iterator iter = object_proxy_table_.find(key); |
+ if (iter != object_proxy_table_.end()) { |
+ return iter->second; |
+ } |
+ |
+ scoped_refptr<ObjectProxy> object_proxy = |
+ new ObjectProxy(this, service_name, object_path, |
+ ObjectProxy::IGNORE_SERVICE_UNKNOWN_ERRORS); |
object_proxy_table_[key] = object_proxy; |
return object_proxy.get(); |