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

Unified Diff: dbus/bus.cc

Issue 9373039: Allow dbus clients to silence logging when a service is unavailable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use pair, factor out error logging logic Created 8 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/bus.h ('k') | dbus/bus_unittest.cc » ('j') | dbus/object_proxy.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/bus.cc
diff --git a/dbus/bus.cc b/dbus/bus.cc
index d0662171f2460cf0aa2bf3f51596239ae47a7b3c..4a7e92bc156e8acfdba1f15fdaa41c99dbf6a01e 100644
--- a/dbus/bus.cc
+++ b/dbus/bus.cc
@@ -208,17 +208,24 @@ Bus::~Bus() {
ObjectProxy* Bus::GetObjectProxy(const std::string& service_name,
const std::string& object_path) {
+ return GetObjectProxyWithOptions(service_name, object_path,
+ ObjectProxy::DEFAULT_OPTIONS);
+}
+
+ObjectProxy* Bus::GetObjectProxyWithOptions(const std::string& service_name,
+ const std::string& object_path,
+ int options) {
AssertOnOriginThread();
// Check if we already have the requested object proxy.
- const std::string key = service_name + object_path;
+ const ObjectProxyTable::key_type key(service_name + object_path, options);
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);
+ new ObjectProxy(this, service_name, object_path, options);
object_proxy_table_[key] = object_proxy;
return object_proxy.get();
« no previous file with comments | « dbus/bus.h ('k') | dbus/bus_unittest.cc » ('j') | dbus/object_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698