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

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

Issue 7796026: Pass SessionConfig by reference instead of pointer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 3 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 | « remoting/protocol/jingle_session_manager.cc ('k') | remoting/protocol/protocol_mock_objects.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/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
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
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
OLDNEW
« no previous file with comments | « remoting/protocol/jingle_session_manager.cc ('k') | remoting/protocol/protocol_mock_objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698