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

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

Issue 10332285: Reland 137824 - was reverted by mistake (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
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/jingle_session_manager.h" 5 #include "remoting/protocol/jingle_session_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "remoting/jingle_glue/iq_sender.h" 8 #include "remoting/jingle_glue/iq_sender.h"
9 #include "remoting/jingle_glue/jingle_info_request.h" 9 #include "remoting/jingle_glue/jingle_info_request.h"
10 #include "remoting/jingle_glue/signal_strategy.h" 10 #include "remoting/jingle_glue/signal_strategy.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 134 }
135 135
136 if (message.action == JingleMessage::SESSION_INITIATE) { 136 if (message.action == JingleMessage::SESSION_INITIATE) {
137 // Description must be present in session-initiate messages. 137 // Description must be present in session-initiate messages.
138 DCHECK(message.description.get()); 138 DCHECK(message.description.get());
139 139
140 SendReply(stanza, JingleMessageReply::NONE); 140 SendReply(stanza, JingleMessageReply::NONE);
141 141
142 scoped_ptr<Authenticator> authenticator = 142 scoped_ptr<Authenticator> authenticator =
143 authenticator_factory_->CreateAuthenticator( 143 authenticator_factory_->CreateAuthenticator(
144 message.from, message.description->authenticator_message()); 144 signal_strategy_->GetLocalJid(), message.from,
145 message.description->authenticator_message());
145 146
146 JingleSession* session = new JingleSession(this); 147 JingleSession* session = new JingleSession(this);
147 session->InitializeIncomingConnection(message, authenticator.Pass()); 148 session->InitializeIncomingConnection(message, authenticator.Pass());
148 sessions_[session->session_id_] = session; 149 sessions_[session->session_id_] = session;
149 150
150 IncomingSessionResponse response = SessionManager::DECLINE; 151 IncomingSessionResponse response = SessionManager::DECLINE;
151 listener_->OnIncomingSession(session, &response); 152 listener_->OnIncomingSession(session, &response);
152 153
153 if (response == SessionManager::ACCEPT) { 154 if (response == SessionManager::ACCEPT) {
154 session->AcceptIncomingConnection(message); 155 session->AcceptIncomingConnection(message);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 signal_strategy_->SendStanza( 197 signal_strategy_->SendStanza(
197 JingleMessageReply(error).ToXml(original_stanza)); 198 JingleMessageReply(error).ToXml(original_stanza));
198 } 199 }
199 200
200 void JingleSessionManager::SessionDestroyed(JingleSession* session) { 201 void JingleSessionManager::SessionDestroyed(JingleSession* session) {
201 sessions_.erase(session->session_id_); 202 sessions_.erase(session->session_id_);
202 } 203 }
203 204
204 } // namespace protocol 205 } // namespace protocol
205 } // namespace remoting 206 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/it2me_host_authenticator_factory.cc ('k') | remoting/protocol/me2me_host_authenticator_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698