diff options
author | adamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-10 21:45:23 +0000 |
---|---|---|
committer | adamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-10 21:45:23 +0000 |
commit | 20bed01e980a5853dd87d4c0d65d4912697f22ae (patch) | |
tree | ba248e80e0792a777a7c3ab96f319bc98f6ef025 /dbus/bus.cc | |
parent | e84efb11971bfbddfaff7b97f1fe8bb21fa82028 (diff) | |
download | chromium_src-20bed01e980a5853dd87d4c0d65d4912697f22ae.zip chromium_src-20bed01e980a5853dd87d4c0d65d4912697f22ae.tar.gz chromium_src-20bed01e980a5853dd87d4c0d65d4912697f22ae.tar.bz2 |
Allow dbus clients to silence logging when a service is unavailable.
BUG=109696
Review URL: https://chromiumcodereview.appspot.com/9373039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121544 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus/bus.cc')
-rw-r--r-- | dbus/bus.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/dbus/bus.cc b/dbus/bus.cc index d066217..0c6a421 100644 --- a/dbus/bus.cc +++ b/dbus/bus.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -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(); |