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

Side by Side Diff: remoting/host/chromoting_host_unittest.cc

Issue 8889024: Removing MessageLoop::QuitTask() from remoting/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | « no previous file | remoting/host/log_to_server_unittest.cc » ('j') | 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/message_loop_proxy.h" 7 #include "base/message_loop_proxy.h"
8 #include "base/task.h" 8 #include "base/task.h"
9 #include "remoting/host/capturer_fake.h" 9 #include "remoting/host/capturer_fake.h"
10 #include "remoting/host/chromoting_host.h" 10 #include "remoting/host/chromoting_host.h"
(...skipping 27 matching lines...) Expand all
38 using testing::InvokeWithoutArgs; 38 using testing::InvokeWithoutArgs;
39 using testing::Return; 39 using testing::Return;
40 using testing::ReturnRef; 40 using testing::ReturnRef;
41 using testing::Sequence; 41 using testing::Sequence;
42 42
43 namespace remoting { 43 namespace remoting {
44 44
45 namespace { 45 namespace {
46 46
47 void PostQuitTask(MessageLoop* message_loop) { 47 void PostQuitTask(MessageLoop* message_loop) {
48 message_loop->PostTask(FROM_HERE, new MessageLoop::QuitTask()); 48 message_loop->PostTask(FROM_HERE, MessageLoop::QuitClosure());
49 } 49 }
50 50
51 // Run the task and delete it afterwards. This action is used to deal with 51 // Run the task and delete it afterwards. This action is used to deal with
52 // done callbacks. 52 // done callbacks.
53 ACTION(RunDoneTask) { 53 ACTION(RunDoneTask) {
54 arg1.Run(); 54 arg1.Run();
55 } 55 }
56 56
57 ACTION_P(QuitMainMessageLoop, message_loop) { 57 ACTION_P(QuitMainMessageLoop, message_loop) {
58 PostQuitTask(message_loop); 58 PostQuitTask(message_loop);
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 EXPECT_CALL(*connection_, Disconnect()) 366 EXPECT_CALL(*connection_, Disconnect())
367 .RetiresOnSaturation(); 367 .RetiresOnSaturation();
368 EXPECT_CALL(*connection2_, Disconnect()) 368 EXPECT_CALL(*connection2_, Disconnect())
369 .RetiresOnSaturation(); 369 .RetiresOnSaturation();
370 370
371 SimulateClientConnection(0, true); 371 SimulateClientConnection(0, true);
372 message_loop_.Run(); 372 message_loop_.Run();
373 } 373 }
374 374
375 } // namespace remoting 375 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/host/log_to_server_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698