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

Unified Diff: dbus/test_service.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: Addressed comments by satorux@; added unit test. Created 6 years, 4 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
« dbus/bus.h ('K') | « dbus/test_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/test_service.cc
diff --git a/dbus/test_service.cc b/dbus/test_service.cc
index 96fa8bced98764ff043b0c2b66023972ed98747c..9e98358bc11bf12473fa3def28ee5f1db3297d4d 100644
--- a/dbus/test_service.cc
+++ b/dbus/test_service.cc
@@ -24,7 +24,7 @@ void EmptyCallback(bool /* success */) {
namespace dbus {
// Echo, SlowEcho, AsyncEcho, BrokenMethod, GetAll, Get, Set, PerformAction,
-// GetManagedObjects.
+// GetManagedObjects
const int TestService::kNumMethodsToExport = 9;
TestService::Options::Options()
@@ -160,6 +160,10 @@ void TestService::ReleaseOwnershipInternal(
callback);
}
+void TestService::SetSendImmediatePropertiesChanged() {
+ send_immediate_properties_changed_ = true;
+}
+
void TestService::OnExported(const std::string& interface_name,
const std::string& method_name,
bool success) {
@@ -485,7 +489,8 @@ void TestService::PerformAction(
base::Unretained(this),
method_call, response_sender));
return;
- }
+ } else if (action == "SetSendImmediatePropertiesChanged")
+ SetSendImmediatePropertiesChanged();
satorux1 2014/08/29 05:20:53 please add {} and while you are at it, please add
armansito 2014/08/29 16:17:08 Done.
scoped_ptr<Response> response = Response::FromMethodCall(method_call);
response_sender.Run(response.Pass());
@@ -556,6 +561,9 @@ void TestService::GetManagedObjects(
writer.CloseContainer(&array_writer);
response_sender.Run(response.Pass());
+
+ if (send_immediate_properties_changed_)
+ SendPropertyChangedSignal("ChangedTestServiceName");
}
void TestService::AddPropertiesToWriter(MessageWriter* writer) {
« dbus/bus.h ('K') | « dbus/test_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698