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

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

Issue 8774017: Add AUTHENTICATED session state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years 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/connection_to_host.cc ('k') | remoting/protocol/jingle_session_unittest.cc » ('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 "remoting/protocol/jingle_session.h" 5 #include "remoting/protocol/jingle_session.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 // host responded with, to refer to later. 318 // host responded with, to refer to later.
319 if (cricket_session_->initiator()) { 319 if (cricket_session_->initiator()) {
320 if (!InitializeConfigFromDescription( 320 if (!InitializeConfigFromDescription(
321 cricket_session_->remote_description())) { 321 cricket_session_->remote_description())) {
322 CloseInternal(net::ERR_CONNECTION_FAILED, INCOMPATIBLE_PROTOCOL); 322 CloseInternal(net::ERR_CONNECTION_FAILED, INCOMPATIBLE_PROTOCOL);
323 return; 323 return;
324 } 324 }
325 } 325 }
326 326
327 SetState(CONNECTED); 327 SetState(CONNECTED);
328
329 if (authenticator_->state() == Authenticator::ACCEPTED)
330 SetState(AUTHENTICATED);
328 } 331 }
329 332
330 void JingleSession::OnTerminate() { 333 void JingleSession::OnTerminate() {
331 DCHECK(CalledOnValidThread()); 334 DCHECK(CalledOnValidThread());
332 CloseInternal(net::ERR_CONNECTION_ABORTED, OK); 335 CloseInternal(net::ERR_CONNECTION_ABORTED, OK);
333 } 336 }
334 337
335 void JingleSession::AcceptConnection() { 338 void JingleSession::AcceptConnection() {
336 SetState(CONNECTING); 339 SetState(CONNECTING);
337 340
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 const buzz::XmlElement* authenticator_message) { 468 const buzz::XmlElement* authenticator_message) {
466 cricket::SessionDescription* desc = new cricket::SessionDescription(); 469 cricket::SessionDescription* desc = new cricket::SessionDescription();
467 desc->AddContent( 470 desc->AddContent(
468 ContentDescription::kChromotingContentName, kChromotingXmlNamespace, 471 ContentDescription::kChromotingContentName, kChromotingXmlNamespace,
469 new ContentDescription(config, authenticator_message)); 472 new ContentDescription(config, authenticator_message));
470 return desc; 473 return desc;
471 } 474 }
472 475
473 } // namespace protocol 476 } // namespace protocol
474 } // namespace remoting 477 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/connection_to_host.cc ('k') | remoting/protocol/jingle_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698