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

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

Issue 205583011: [Draft] Fix canceling pin prompt causes host overload (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Last round of feedbacks Created 6 years, 8 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/negotiating_authenticator_base.h" 5 #include "remoting/protocol/negotiating_authenticator_base.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 22 matching lines...) Expand all
33 rejection_reason_(INVALID_CREDENTIALS) { 33 rejection_reason_(INVALID_CREDENTIALS) {
34 } 34 }
35 35
36 NegotiatingAuthenticatorBase::~NegotiatingAuthenticatorBase() { 36 NegotiatingAuthenticatorBase::~NegotiatingAuthenticatorBase() {
37 } 37 }
38 38
39 Authenticator::State NegotiatingAuthenticatorBase::state() const { 39 Authenticator::State NegotiatingAuthenticatorBase::state() const {
40 return state_; 40 return state_;
41 } 41 }
42 42
43 bool NegotiatingAuthenticatorBase::started() const {
44 if (!current_authenticator_) {
45 return false;
46 }
47 return current_authenticator_->started();
48 }
49
43 Authenticator::RejectionReason 50 Authenticator::RejectionReason
44 NegotiatingAuthenticatorBase::rejection_reason() const { 51 NegotiatingAuthenticatorBase::rejection_reason() const {
45 return rejection_reason_; 52 return rejection_reason_;
46 } 53 }
47 54
48 void NegotiatingAuthenticatorBase::ProcessMessageInternal( 55 void NegotiatingAuthenticatorBase::ProcessMessageInternal(
49 const buzz::XmlElement* message, 56 const buzz::XmlElement* message,
50 const base::Closure& resume_callback) { 57 const base::Closure& resume_callback) {
51 if (current_authenticator_->state() == WAITING_MESSAGE) { 58 if (current_authenticator_->state() == WAITING_MESSAGE) {
52 // If the message was not discarded and the authenticator is waiting for it, 59 // If the message was not discarded and the authenticator is waiting for it,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 104 }
98 105
99 scoped_ptr<ChannelAuthenticator> 106 scoped_ptr<ChannelAuthenticator>
100 NegotiatingAuthenticatorBase::CreateChannelAuthenticator() const { 107 NegotiatingAuthenticatorBase::CreateChannelAuthenticator() const {
101 DCHECK_EQ(state(), ACCEPTED); 108 DCHECK_EQ(state(), ACCEPTED);
102 return current_authenticator_->CreateChannelAuthenticator(); 109 return current_authenticator_->CreateChannelAuthenticator();
103 } 110 }
104 111
105 } // namespace protocol 112 } // namespace protocol
106 } // namespace remoting 113 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/negotiating_authenticator_base.h ('k') | remoting/protocol/pairing_authenticator_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698