| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "dbus/test_service.h" | 5 #include "dbus/test_service.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/test/test_timeouts.h" | 8 #include "base/test/test_timeouts.h" |
| 9 #include "base/threading/platform_thread.h" | 9 #include "base/threading/platform_thread.h" |
| 10 #include "dbus/bus.h" | 10 #include "dbus/bus.h" |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 225 |
| 226 void TestService::AsyncEcho( | 226 void TestService::AsyncEcho( |
| 227 MethodCall* method_call, | 227 MethodCall* method_call, |
| 228 dbus::ExportedObject::ResponseSender response_sender) { | 228 dbus::ExportedObject::ResponseSender response_sender) { |
| 229 // Schedule a call to Echo() to send an asynchronous response after we return. | 229 // Schedule a call to Echo() to send an asynchronous response after we return. |
| 230 message_loop()->PostDelayedTask(FROM_HERE, | 230 message_loop()->PostDelayedTask(FROM_HERE, |
| 231 base::Bind(&TestService::Echo, | 231 base::Bind(&TestService::Echo, |
| 232 base::Unretained(this), | 232 base::Unretained(this), |
| 233 method_call, | 233 method_call, |
| 234 response_sender), | 234 response_sender), |
| 235 TestTimeouts::tiny_timeout_ms()); | 235 TestTimeouts::tiny_timeout()); |
| 236 } | 236 } |
| 237 | 237 |
| 238 void TestService::BrokenMethod( | 238 void TestService::BrokenMethod( |
| 239 MethodCall* method_call, | 239 MethodCall* method_call, |
| 240 dbus::ExportedObject::ResponseSender response_sender) { | 240 dbus::ExportedObject::ResponseSender response_sender) { |
| 241 response_sender.Run(NULL); | 241 response_sender.Run(NULL); |
| 242 } | 242 } |
| 243 | 243 |
| 244 | 244 |
| 245 void TestService::GetAllProperties( | 245 void TestService::GetAllProperties( |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 array_writer.OpenDictEntry(&dict_entry_writer); | 391 array_writer.OpenDictEntry(&dict_entry_writer); |
| 392 dict_entry_writer.AppendString("Name"); | 392 dict_entry_writer.AppendString("Name"); |
| 393 dict_entry_writer.AppendVariantOfString(name); | 393 dict_entry_writer.AppendVariantOfString(name); |
| 394 array_writer.CloseContainer(&dict_entry_writer); | 394 array_writer.CloseContainer(&dict_entry_writer); |
| 395 writer.CloseContainer(&array_writer); | 395 writer.CloseContainer(&array_writer); |
| 396 | 396 |
| 397 exported_object_->SendSignal(&signal); | 397 exported_object_->SendSignal(&signal); |
| 398 } | 398 } |
| 399 | 399 |
| 400 } // namespace dbus | 400 } // namespace dbus |
| OLD | NEW |