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

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

Issue 292093002: Switch CandidateSession to use lists rather than vectors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix EnableVideoCodec & rebase Created 6 years, 7 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/host/it2me/it2me_host.cc ('k') | remoting/protocol/content_description.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "remoting/protocol/connection_to_host.h" 5 #include "remoting/protocol/connection_to_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "remoting/base/constants.h" 10 #include "remoting/base/constants.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 const buzz::XmlElement* stanza) { 135 const buzz::XmlElement* stanza) {
136 return false; 136 return false;
137 } 137 }
138 138
139 void ConnectionToHost::OnSessionManagerReady() { 139 void ConnectionToHost::OnSessionManagerReady() {
140 DCHECK(CalledOnValidThread()); 140 DCHECK(CalledOnValidThread());
141 141
142 // After SessionManager is initialized we can try to connect to the host. 142 // After SessionManager is initialized we can try to connect to the host.
143 scoped_ptr<CandidateSessionConfig> candidate_config = 143 scoped_ptr<CandidateSessionConfig> candidate_config =
144 CandidateSessionConfig::CreateDefault(); 144 CandidateSessionConfig::CreateDefault();
145 if (!audio_stub_) 145 if (!audio_stub_) {
146 CandidateSessionConfig::DisableAudioChannel(candidate_config.get()); 146 candidate_config->DisableAudioChannel();
147 }
147 148
148 session_ = session_manager_->Connect( 149 session_ = session_manager_->Connect(
149 host_jid_, authenticator_.Pass(), candidate_config.Pass()); 150 host_jid_, authenticator_.Pass(), candidate_config.Pass());
150 session_->SetEventHandler(this); 151 session_->SetEventHandler(this);
151 } 152 }
152 153
153 void ConnectionToHost::OnIncomingSession( 154 void ConnectionToHost::OnIncomingSession(
154 Session* session, 155 Session* session,
155 SessionManager::IncomingSessionResponse* response) { 156 SessionManager::IncomingSessionResponse* response) {
156 DCHECK(CalledOnValidThread()); 157 DCHECK(CalledOnValidThread());
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 292
292 if (state != state_) { 293 if (state != state_) {
293 state_ = state; 294 state_ = state;
294 error_ = error; 295 error_ = error;
295 event_callback_->OnConnectionState(state_, error_); 296 event_callback_->OnConnectionState(state_, error_);
296 } 297 }
297 } 298 }
298 299
299 } // namespace protocol 300 } // namespace protocol
300 } // namespace remoting 301 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/it2me/it2me_host.cc ('k') | remoting/protocol/content_description.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698