OLD | NEW |
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 result->AddAttr(kMethodAttributeQName, current_method_.ToString()); | 96 result->AddAttr(kMethodAttributeQName, current_method_.ToString()); |
97 return result.Pass(); | 97 return result.Pass(); |
98 } | 98 } |
99 | 99 |
100 void NegotiatingAuthenticatorBase::AddMethod( | 100 void NegotiatingAuthenticatorBase::AddMethod( |
101 const AuthenticationMethod& method) { | 101 const AuthenticationMethod& method) { |
102 DCHECK(method.is_valid()); | 102 DCHECK(method.is_valid()); |
103 methods_.push_back(method); | 103 methods_.push_back(method); |
104 } | 104 } |
105 | 105 |
| 106 const std::string& NegotiatingAuthenticatorBase::GetAuthKey() const { |
| 107 DCHECK_EQ(state(), ACCEPTED); |
| 108 return current_authenticator_->GetAuthKey(); |
| 109 } |
| 110 |
106 scoped_ptr<ChannelAuthenticator> | 111 scoped_ptr<ChannelAuthenticator> |
107 NegotiatingAuthenticatorBase::CreateChannelAuthenticator() const { | 112 NegotiatingAuthenticatorBase::CreateChannelAuthenticator() const { |
108 DCHECK_EQ(state(), ACCEPTED); | 113 DCHECK_EQ(state(), ACCEPTED); |
109 return current_authenticator_->CreateChannelAuthenticator(); | 114 return current_authenticator_->CreateChannelAuthenticator(); |
110 } | 115 } |
111 | 116 |
112 } // namespace protocol | 117 } // namespace protocol |
113 } // namespace remoting | 118 } // namespace remoting |
OLD | NEW |