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

Side by Side Diff: dbus/test_service.cc

Issue 9215005: Revert 117824 - Convert use of int ms to TimeDelta in files owned by brettw. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 11 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
« no previous file with comments | « content/renderer/render_widget.cc ('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) 2012 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"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 Response* response = Response::FromMethodCall(method_call); 184 Response* response = Response::FromMethodCall(method_call);
185 MessageWriter writer(response); 185 MessageWriter writer(response);
186 writer.AppendString(text_message); 186 writer.AppendString(text_message);
187 response_sender.Run(response); 187 response_sender.Run(response);
188 } 188 }
189 189
190 void TestService::SlowEcho( 190 void TestService::SlowEcho(
191 MethodCall* method_call, 191 MethodCall* method_call,
192 dbus::ExportedObject::ResponseSender response_sender) { 192 dbus::ExportedObject::ResponseSender response_sender) {
193 base::PlatformThread::Sleep(TestTimeouts::tiny_timeout()); 193 base::PlatformThread::Sleep(TestTimeouts::tiny_timeout_ms());
194 Echo(method_call, response_sender); 194 Echo(method_call, response_sender);
195 } 195 }
196 196
197 void TestService::AsyncEcho( 197 void TestService::AsyncEcho(
198 MethodCall* method_call, 198 MethodCall* method_call,
199 dbus::ExportedObject::ResponseSender response_sender) { 199 dbus::ExportedObject::ResponseSender response_sender) {
200 // Schedule a call to Echo() to send an asynchronous response after we return. 200 // Schedule a call to Echo() to send an asynchronous response after we return.
201 message_loop()->PostDelayedTask(FROM_HERE, 201 message_loop()->PostDelayedTask(FROM_HERE,
202 base::Bind(&TestService::Echo, 202 base::Bind(&TestService::Echo,
203 base::Unretained(this), 203 base::Unretained(this),
204 method_call, 204 method_call,
205 response_sender), 205 response_sender),
206 TestTimeouts::tiny_timeout_ms()); 206 TestTimeouts::tiny_timeout_ms());
207 } 207 }
208 208
209 void TestService::BrokenMethod( 209 void TestService::BrokenMethod(
210 MethodCall* method_call, 210 MethodCall* method_call,
211 dbus::ExportedObject::ResponseSender response_sender) { 211 dbus::ExportedObject::ResponseSender response_sender) {
212 response_sender.Run(NULL); 212 response_sender.Run(NULL);
213 } 213 }
214 214
215 } // namespace dbus 215 } // namespace dbus
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698