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

Unified Diff: dbus/exported_object.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/dbus.gyp ('k') | dbus/object_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/exported_object.cc
diff --git a/dbus/exported_object.cc b/dbus/exported_object.cc
index 1a4fbb50eb4ad59f03767434fe8e5fe78f912cd1..107d2e5dd1762629ad436c54d76727ea6efba230 100644
--- a/dbus/exported_object.cc
+++ b/dbus/exported_object.cc
@@ -15,6 +15,7 @@
#include "dbus/message.h"
#include "dbus/object_path.h"
#include "dbus/scoped_dbus_error.h"
+#include "dbus/util.h"
namespace dbus {
@@ -23,15 +24,6 @@ namespace {
// Used for success ratio histograms. 1 for success, 0 for failure.
const int kSuccessRatioHistogramMaxValue = 2;
-// Gets the absolute method name by concatenating the interface name and
-// the method name. Used for building keys for method_table_ in
-// ExportedObject.
-std::string GetAbsoluteMethodName(
- const std::string& interface_name,
- const std::string& method_name) {
- return interface_name + "." + method_name;
-}
-
} // namespace
ExportedObject::ExportedObject(Bus* bus,
@@ -53,7 +45,7 @@ bool ExportedObject::ExportMethodAndBlock(
// Check if the method is already exported.
const std::string absolute_method_name =
- GetAbsoluteMethodName(interface_name, method_name);
+ GetAbsoluteMemberName(interface_name, method_name);
if (method_table_.find(absolute_method_name) != method_table_.end()) {
LOG(ERROR) << absolute_method_name << " is already exported";
return false;
@@ -203,7 +195,7 @@ DBusHandlerResult ExportedObject::HandleMessage(
}
// Check if we know about the method.
- const std::string absolute_method_name = GetAbsoluteMethodName(
+ const std::string absolute_method_name = GetAbsoluteMemberName(
interface, member);
MethodTable::const_iterator iter = method_table_.find(absolute_method_name);
if (iter == method_table_.end()) {
« no previous file with comments | « dbus/dbus.gyp ('k') | dbus/object_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698