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

Side by Side Diff: dbus/test_service.cc

Issue 7800023: Linux: use MessageLoopProxy instead of base::Thread in our DBus client library. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« dbus/bus.cc ('K') | « dbus/test_service.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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"
11 #include "dbus/exported_object.h" 11 #include "dbus/exported_object.h"
12 #include "dbus/message.h" 12 #include "dbus/message.h"
13 13
14 namespace dbus { 14 namespace dbus {
15 15
16 // Echo, SlowEcho, BrokenMethod. 16 // Echo, SlowEcho, BrokenMethod.
17 const int TestService::kNumMethodsToExport = 3; 17 const int TestService::kNumMethodsToExport = 3;
18 18
19 TestService::Options::Options() 19 TestService::Options::Options() {
20 : dbus_thread(NULL) {
21 } 20 }
22 21
23 TestService::Options::~Options() { 22 TestService::Options::~Options() {
24 } 23 }
25 24
26 TestService::TestService(const Options& options) 25 TestService::TestService(const Options& options)
27 : base::Thread("TestService"), 26 : base::Thread("TestService"),
28 dbus_thread_(options.dbus_thread), 27 dbus_thread_(options.dbus_thread),
29 on_all_methods_exported_(false, false), 28 on_all_methods_exported_(false, false),
30 num_exported_methods_(0) { 29 num_exported_methods_(0) {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 Response* TestService::SlowEcho(MethodCall* method_call) { 157 Response* TestService::SlowEcho(MethodCall* method_call) {
159 base::PlatformThread::Sleep(TestTimeouts::tiny_timeout_ms()); 158 base::PlatformThread::Sleep(TestTimeouts::tiny_timeout_ms());
160 return Echo(method_call); 159 return Echo(method_call);
161 } 160 }
162 161
163 Response* TestService::BrokenMethod(MethodCall* method_call) { 162 Response* TestService::BrokenMethod(MethodCall* method_call) {
164 return NULL; 163 return NULL;
165 } 164 }
166 165
167 } // namespace dbus 166 } // namespace dbus
OLDNEW
« dbus/bus.cc ('K') | « dbus/test_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698