| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // * The client may optimistically pick a method on its first message (assuming | 53 // * The client may optimistically pick a method on its first message (assuming |
| 54 // it doesn't require user interaction to start). If the host doesn't | 54 // it doesn't require user interaction to start). If the host doesn't |
| 55 // support that method, it will just discard that message, and choose | 55 // support that method, it will just discard that message, and choose |
| 56 // another method from the client's supported methods list. | 56 // another method from the client's supported methods list. |
| 57 // * The host never sends its own supported methods back to the client, so once | 57 // * The host never sends its own supported methods back to the client, so once |
| 58 // the host picks a method from the client's list, it's final. | 58 // the host picks a method from the client's list, it's final. |
| 59 // * Any change in this class must maintain compatibility between any version | 59 // * Any change in this class must maintain compatibility between any version |
| 60 // mix of webapp, client plugin and host, for both Me2Me and IT2Me. | 60 // mix of webapp, client plugin and host, for both Me2Me and IT2Me. |
| 61 class NegotiatingAuthenticatorBase : public Authenticator { | 61 class NegotiatingAuthenticatorBase : public Authenticator { |
| 62 public: | 62 public: |
| 63 virtual ~NegotiatingAuthenticatorBase(); | 63 ~NegotiatingAuthenticatorBase() override; |
| 64 | 64 |
| 65 // Authenticator interface. | 65 // Authenticator interface. |
| 66 virtual State state() const override; | 66 State state() const override; |
| 67 virtual bool started() const override; | 67 bool started() const override; |
| 68 virtual RejectionReason rejection_reason() const override; | 68 RejectionReason rejection_reason() const override; |
| 69 virtual scoped_ptr<ChannelAuthenticator> | 69 scoped_ptr<ChannelAuthenticator> CreateChannelAuthenticator() const override; |
| 70 CreateChannelAuthenticator() const override; | |
| 71 | 70 |
| 72 // Calls |current_authenticator_| to process |message|, passing the supplied | 71 // Calls |current_authenticator_| to process |message|, passing the supplied |
| 73 // |resume_callback|. | 72 // |resume_callback|. |
| 74 void ProcessMessageInternal(const buzz::XmlElement* message, | 73 void ProcessMessageInternal(const buzz::XmlElement* message, |
| 75 const base::Closure& resume_callback); | 74 const base::Closure& resume_callback); |
| 76 | 75 |
| 77 const AuthenticationMethod& current_method_for_testing() const { | 76 const AuthenticationMethod& current_method_for_testing() const { |
| 78 return current_method_; | 77 return current_method_; |
| 79 } | 78 } |
| 80 | 79 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 102 RejectionReason rejection_reason_; | 101 RejectionReason rejection_reason_; |
| 103 | 102 |
| 104 private: | 103 private: |
| 105 DISALLOW_COPY_AND_ASSIGN(NegotiatingAuthenticatorBase); | 104 DISALLOW_COPY_AND_ASSIGN(NegotiatingAuthenticatorBase); |
| 106 }; | 105 }; |
| 107 | 106 |
| 108 } // namespace protocol | 107 } // namespace protocol |
| 109 } // namespace remoting | 108 } // namespace remoting |
| 110 | 109 |
| 111 #endif // REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_BASE_H_ | 110 #endif // REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_BASE_H_ |
| OLD | NEW |