OLD | NEW |
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 } | 117 } |
118 | 118 |
119 // Helper method to copy to set value of client_connection_. | 119 // Helper method to copy to set value of client_connection_. |
120 void SetHostSession(Session* session) { | 120 void SetHostSession(Session* session) { |
121 DCHECK(session); | 121 DCHECK(session); |
122 host_session_.reset(session); | 122 host_session_.reset(session); |
123 host_session_->SetStateChangeCallback( | 123 host_session_->SetStateChangeCallback( |
124 NewCallback(&host_connection_callback_, | 124 NewCallback(&host_connection_callback_, |
125 &MockSessionCallback::OnStateChange)); | 125 &MockSessionCallback::OnStateChange)); |
126 | 126 |
127 session->set_config(SessionConfig::CreateDefault()); | 127 session->set_config(SessionConfig::GetDefault()); |
128 session->set_shared_secret(kTestSharedSecret); | 128 session->set_shared_secret(kTestSharedSecret); |
129 } | 129 } |
130 | 130 |
131 protected: | 131 protected: |
132 virtual void SetUp() { | 132 virtual void SetUp() { |
133 } | 133 } |
134 | 134 |
135 virtual void TearDown() { | 135 virtual void TearDown() { |
136 CloseSessions(); | 136 CloseSessions(); |
137 CloseSessionManager(); | 137 CloseSessionManager(); |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 ASSERT_TRUE(tester->WaitFinished()); | 788 ASSERT_TRUE(tester->WaitFinished()); |
789 LOG(INFO) << "Time for 500k bytes " | 789 LOG(INFO) << "Time for 500k bytes " |
790 << tester->GetElapsedTime().InMilliseconds() << " ms."; | 790 << tester->GetElapsedTime().InMilliseconds() << " ms."; |
791 | 791 |
792 // Connections must be closed while |tester| still exists. | 792 // Connections must be closed while |tester| still exists. |
793 CloseSessions(); | 793 CloseSessions(); |
794 } | 794 } |
795 | 795 |
796 } // namespace protocol | 796 } // namespace protocol |
797 } // namespace remoting | 797 } // namespace remoting |
OLD | NEW |