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

Unified Diff: dbus/object_proxy.cc

Issue 510863002: dbus::ObjectManager: Add a match rule for properties before GetManagedObjects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased; updated BUILD.gn; fixed crash from latest RunLoop changes Created 6 years, 3 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_manager_unittest.cc ('k') | dbus/test_service.h » ('j') | 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 d0b660b600dbc368fc28e4804d905cc5b90e6198..016425dd50b7c5bd702e0d539bbb6fe1379de1c3 100644
--- a/dbus/object_proxy.cc
+++ b/dbus/object_proxy.cc
@@ -18,6 +18,7 @@
#include "dbus/object_path.h"
#include "dbus/object_proxy.h"
#include "dbus/scoped_dbus_error.h"
+#include "dbus/util.h"
namespace dbus {
@@ -41,15 +42,6 @@ const char kDBusSystemObjectAddress[] = "org.freedesktop.DBus";
// The NameOwnerChanged member in |kDBusSystemObjectInterface|.
const char kNameOwnerChangedMember[] = "NameOwnerChanged";
-// Gets the absolute signal name by concatenating the interface name and
-// the signal name. Used for building keys for method_table_ in
-// ObjectProxy.
-std::string GetAbsoluteSignalName(
- const std::string& interface_name,
- const std::string& signal_name) {
- return interface_name + "." + signal_name;
-}
-
// An empty function used for ObjectProxy::EmptyResponseCallback().
void EmptyResponseCallbackBody(Response* /*response*/) {
}
@@ -421,7 +413,7 @@ bool ObjectProxy::ConnectToSignalInternal(const std::string& interface_name,
return false;
const std::string absolute_signal_name =
- GetAbsoluteSignalName(interface_name, signal_name);
+ GetAbsoluteMemberName(interface_name, signal_name);
// Add a match rule so the signal goes through HandleMessage().
const std::string match_rule =
@@ -488,7 +480,7 @@ DBusHandlerResult ObjectProxy::HandleMessage(
statistics::AddReceivedSignal(service_name_, interface, member);
// Check if we know about the signal.
- const std::string absolute_signal_name = GetAbsoluteSignalName(
+ const std::string absolute_signal_name = GetAbsoluteMemberName(
interface, member);
MethodTable::const_iterator iter = method_table_.find(absolute_signal_name);
if (iter == method_table_.end()) {
« no previous file with comments | « dbus/object_manager_unittest.cc ('k') | dbus/test_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698