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

Side by Side Diff: remoting/protocol/jingle_session_unittest.cc

Issue 7291016: Remove SessionManagerPair. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update comment Created 9 years, 5 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 | « no previous file | remoting/protocol/session_manager_pair.h » ('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/file_path.h" 5 #include "base/file_path.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 virtual void TearDown() { 95 virtual void TearDown() {
96 CloseSessions(); 96 CloseSessions();
97 thread_.message_loop()->PostTask( 97 thread_.message_loop()->PostTask(
98 FROM_HERE, NewRunnableMethod( 98 FROM_HERE, NewRunnableMethod(
99 this, &JingleSessionTest::DoCloseSessionManager)); 99 this, &JingleSessionTest::DoCloseSessionManager));
100 thread_.Stop(); 100 thread_.Stop();
101 } 101 }
102 102
103 void CreateServerPair() { 103 void CreateServerPair() {
104 // SessionManagerPair must be initialized on the jingle thread. 104 // Sessions must be initialized on the jingle thread.
105 thread_.message_loop()->PostTask( 105 thread_.message_loop()->PostTask(
106 FROM_HERE, NewRunnableMethod( 106 FROM_HERE, NewRunnableMethod(
107 this, &JingleSessionTest::DoCreateServerPair)); 107 this, &JingleSessionTest::DoCreateServerPair));
108 SyncWithJingleThread(); 108 SyncWithJingleThread();
109 } 109 }
110 110
111 void CloseSessions() { 111 void CloseSessions() {
112 thread_.message_loop()->PostTask( 112 thread_.message_loop()->PostTask(
113 FROM_HERE, NewRunnableMethod( 113 FROM_HERE, NewRunnableMethod(
114 this, &JingleSessionTest::DoCloseSessions)); 114 this, &JingleSessionTest::DoCloseSessions));
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 << tester->GetElapsedTime().InMilliseconds() << " ms."; 747 << tester->GetElapsedTime().InMilliseconds() << " ms.";
748 748
749 // Connections must be closed while |tester| still exists. 749 // Connections must be closed while |tester| still exists.
750 CloseSessions(); 750 CloseSessions();
751 } 751 }
752 752
753 #endif 753 #endif
754 754
755 } // namespace protocol 755 } // namespace protocol
756 } // namespace remoting 756 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/protocol/session_manager_pair.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698