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

Side by Side Diff: remoting/protocol/jingle_session_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 | « remoting/jingle_glue/jingle_thread.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) 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/file_path.h" 6 #include "base/file_path.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/message_loop_proxy.h" 8 #include "base/message_loop_proxy.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 "0GUd2FIiZ/6Fc9D/iiyUgli+FIY5dwsrSoNJ87sYGifVDh8a5fdZNV5y58CcrapI5fJI" 70 "0GUd2FIiZ/6Fc9D/iiyUgli+FIY5dwsrSoNJ87sYGifVDh8a5fdZNV5y58CcrapI5fJI"
71 "FpXviSW4g8d/t1gcZkoz1ppmjzbgXm6ckw9Td0yRD0cHu732Ijs+eo8wT0pt4KiHkbyR" 71 "FpXviSW4g8d/t1gcZkoz1ppmjzbgXm6ckw9Td0yRD0cHu732Ijs+eo8wT0pt4KiHkbyR"
72 "iAvjrvkNDlfiEk7tiY7YzD9zTi3146GX6KLz5GQAd/3I8I5QW3ftF1s/m93AHuc383GZ" 72 "iAvjrvkNDlfiEk7tiY7YzD9zTi3146GX6KLz5GQAd/3I8I5QW3ftF1s/m93AHuc383GZ"
73 "A78Oi+IbcJf/jJUZO119VNnRKGiPsf5GZIoHyXX8O5OUQk5soKdQPeK1FwWkeZu6fuXl" 73 "A78Oi+IbcJf/jJUZO119VNnRKGiPsf5GZIoHyXX8O5OUQk5soKdQPeK1FwWkeZu6fuXl"
74 "QoU12I6podD6xMFa/PA/xefMwcpmuWTRhcso9bp10zVFGQIDAQAB"; 74 "QoU12I6podD6xMFa/PA/xefMwcpmuWTRhcso9bp10zVFGQIDAQAB";
75 75
76 const char kTestSharedSecret[] = "1234-1234-5678"; 76 const char kTestSharedSecret[] = "1234-1234-5678";
77 const char kTestSharedSecretBad[] = "0000-0000-0001"; 77 const char kTestSharedSecretBad[] = "0000-0000-0001";
78 78
79 void QuitCurrentThread() { 79 void QuitCurrentThread() {
80 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask()); 80 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
81 } 81 }
82 82
83 void OnTimeoutTerminateThread(bool* timeout) { 83 void OnTimeoutTerminateThread(bool* timeout) {
84 *timeout = true; 84 *timeout = true;
85 QuitCurrentThread(); 85 QuitCurrentThread();
86 } 86 }
87 87
88 bool RunMessageLoopWithTimeout(int timeout_ms) { 88 bool RunMessageLoopWithTimeout(int timeout_ms) {
89 bool timeout = false; 89 bool timeout = false;
90 MessageLoop::current()->PostDelayedTask( 90 MessageLoop::current()->PostDelayedTask(
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 ASSERT_TRUE(tester->WaitFinished()); 913 ASSERT_TRUE(tester->WaitFinished());
914 LOG(INFO) << "Time for 500k bytes " 914 LOG(INFO) << "Time for 500k bytes "
915 << tester->GetElapsedTime().InMilliseconds() << " ms."; 915 << tester->GetElapsedTime().InMilliseconds() << " ms.";
916 916
917 // Connections must be closed while |tester| still exists. 917 // Connections must be closed while |tester| still exists.
918 CloseSessions(); 918 CloseSessions();
919 } 919 }
920 920
921 } // namespace protocol 921 } // namespace protocol
922 } // namespace remoting 922 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/jingle_glue/jingle_thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698