Index: dbus/bus.cc |
diff --git a/dbus/bus.cc b/dbus/bus.cc |
index d0662171f2460cf0aa2bf3f51596239ae47a7b3c..76ed6db1d2e3a9092bf725234cc88194600772e8 100644 |
--- a/dbus/bus.cc |
+++ b/dbus/bus.cc |
@@ -12,6 +12,7 @@ |
#include "base/message_loop.h" |
#include "base/message_loop_proxy.h" |
#include "base/stl_util.h" |
+#include "base/string_number_conversions.h" |
#include "base/threading/thread.h" |
#include "base/threading/thread_restrictions.h" |
#include "base/time.h" |
@@ -208,17 +209,26 @@ 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; |
+ std::string key = service_name + object_path; |
+ if (options) |
+ key += base::IntToString(options); |
satorux1
2012/02/10 18:09:01
This looks like a hack. Can you change the key to
adamk
2012/02/10 19:28:21
Done.
|
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(); |