| 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 #ifndef REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_BASE_H_ | 5 #ifndef REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_BASE_H_ |
| 6 #define REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_BASE_H_ | 6 #define REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_BASE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 const base::Closure& resume_callback); | 102 const base::Closure& resume_callback); |
| 103 | 103 |
| 104 protected: | 104 protected: |
| 105 friend class NegotiatingAuthenticatorTest; | 105 friend class NegotiatingAuthenticatorTest; |
| 106 FRIEND_TEST_ALL_PREFIXES(NegotiatingAuthenticatorTest, IncompatibleMethods); | 106 FRIEND_TEST_ALL_PREFIXES(NegotiatingAuthenticatorTest, IncompatibleMethods); |
| 107 | 107 |
| 108 static const buzz::StaticQName kMethodAttributeQName; | 108 static const buzz::StaticQName kMethodAttributeQName; |
| 109 static const buzz::StaticQName kSupportedMethodsAttributeQName; | 109 static const buzz::StaticQName kSupportedMethodsAttributeQName; |
| 110 static const char kSupportedMethodsSeparator; | 110 static const char kSupportedMethodsSeparator; |
| 111 | 111 |
| 112 static const buzz::StaticQName kPairingInfoTag; |
| 113 static const buzz::StaticQName kClientIdAttribute; |
| 114 |
| 112 // Parses a string that defines an authentication method. Returns | 115 // Parses a string that defines an authentication method. Returns |
| 113 // Method::INVALID if the string is invalid. | 116 // Method::INVALID if the string is invalid. |
| 114 static Method ParseMethodString(const std::string& value); | 117 static Method ParseMethodString(const std::string& value); |
| 115 | 118 |
| 116 // Returns string representation of |method|. | 119 // Returns string representation of |method|. |
| 117 static std::string MethodToString(Method method); | 120 static std::string MethodToString(Method method); |
| 118 | 121 |
| 119 explicit NegotiatingAuthenticatorBase(Authenticator::State initial_state); | 122 explicit NegotiatingAuthenticatorBase(Authenticator::State initial_state); |
| 120 | 123 |
| 121 void AddMethod(Method method); | 124 void AddMethod(Method method); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 135 RejectionReason rejection_reason_ = INVALID_CREDENTIALS; | 138 RejectionReason rejection_reason_ = INVALID_CREDENTIALS; |
| 136 | 139 |
| 137 private: | 140 private: |
| 138 DISALLOW_COPY_AND_ASSIGN(NegotiatingAuthenticatorBase); | 141 DISALLOW_COPY_AND_ASSIGN(NegotiatingAuthenticatorBase); |
| 139 }; | 142 }; |
| 140 | 143 |
| 141 } // namespace protocol | 144 } // namespace protocol |
| 142 } // namespace remoting | 145 } // namespace remoting |
| 143 | 146 |
| 144 #endif // REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_BASE_H_ | 147 #endif // REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_BASE_H_ |
| OLD | NEW |