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

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

Issue 2277553002: Adding a new authenticator which can be used to validate the remote user (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@policy_change
Patch Set: Addressing Feedback Created 4 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
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.h" 5 #include "remoting/protocol/jingle_session.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <utility> 10 #include <utility>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 ErrorCode AuthRejectionReasonToErrorCode( 50 ErrorCode AuthRejectionReasonToErrorCode(
51 Authenticator::RejectionReason reason) { 51 Authenticator::RejectionReason reason) {
52 switch (reason) { 52 switch (reason) {
53 case Authenticator::INVALID_CREDENTIALS: 53 case Authenticator::INVALID_CREDENTIALS:
54 return AUTHENTICATION_FAILED; 54 return AUTHENTICATION_FAILED;
55 case Authenticator::PROTOCOL_ERROR: 55 case Authenticator::PROTOCOL_ERROR:
56 return INCOMPATIBLE_PROTOCOL; 56 return INCOMPATIBLE_PROTOCOL;
57 case Authenticator::INVALID_ACCOUNT: 57 case Authenticator::INVALID_ACCOUNT:
58 return INVALID_ACCOUNT; 58 return INVALID_ACCOUNT;
59 case Authenticator::REJECTED_BY_USER:
60 return SESSION_REJECTED;
59 } 61 }
60 NOTREACHED(); 62 NOTREACHED();
61 return UNKNOWN_ERROR; 63 return UNKNOWN_ERROR;
62 } 64 }
63 65
64 } // namespace 66 } // namespace
65 67
66 JingleSession::JingleSession(JingleSessionManager* session_manager) 68 JingleSession::JingleSession(JingleSessionManager* session_manager)
67 : session_manager_(session_manager), 69 : session_manager_(session_manager),
68 event_handler_(nullptr), 70 event_handler_(nullptr),
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 } 608 }
607 } 609 }
608 610
609 bool JingleSession::is_session_active() { 611 bool JingleSession::is_session_active() {
610 return state_ == CONNECTING || state_ == ACCEPTING || state_ == ACCEPTED || 612 return state_ == CONNECTING || state_ == ACCEPTING || state_ == ACCEPTED ||
611 state_ == AUTHENTICATING || state_ == AUTHENTICATED; 613 state_ == AUTHENTICATING || state_ == AUTHENTICATED;
612 } 614 }
613 615
614 } // namespace protocol 616 } // namespace protocol
615 } // namespace remoting 617 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698