| OLD | NEW | 
|   1 // Copyright 2013 The Chromium Authors. All rights reserved. |   1 // Copyright 2013 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_THIRD_PARTY_CLIENT_AUTHENTICATOR_H_ |   5 #ifndef REMOTING_PROTOCOL_THIRD_PARTY_CLIENT_AUTHENTICATOR_H_ | 
|   6 #define REMOTING_PROTOCOL_THIRD_PARTY_CLIENT_AUTHENTICATOR_H_ |   6 #define REMOTING_PROTOCOL_THIRD_PARTY_CLIENT_AUTHENTICATOR_H_ | 
|   7  |   7  | 
|   8 #include <string> |   8 #include <string> | 
|   9  |   9  | 
|  10 #include "base/callback.h" |  10 #include "base/callback.h" | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  57   // Creates a third-party client authenticator for the host with the given |  57   // Creates a third-party client authenticator for the host with the given | 
|  58   // |host_public_key|. |token_fetcher| is used to get the authentication token. |  58   // |host_public_key|. |token_fetcher| is used to get the authentication token. | 
|  59   explicit ThirdPartyClientAuthenticator( |  59   explicit ThirdPartyClientAuthenticator( | 
|  60       scoped_ptr<TokenFetcher> token_fetcher); |  60       scoped_ptr<TokenFetcher> token_fetcher); | 
|  61   virtual ~ThirdPartyClientAuthenticator(); |  61   virtual ~ThirdPartyClientAuthenticator(); | 
|  62  |  62  | 
|  63  protected: |  63  protected: | 
|  64   // ThirdPartyAuthenticator implementation. |  64   // ThirdPartyAuthenticator implementation. | 
|  65   virtual void ProcessTokenMessage( |  65   virtual void ProcessTokenMessage( | 
|  66       const buzz::XmlElement* message, |  66       const buzz::XmlElement* message, | 
|  67       const base::Closure& resume_callback) OVERRIDE; |  67       const base::Closure& resume_callback) override; | 
|  68   virtual void AddTokenElements(buzz::XmlElement* message) OVERRIDE; |  68   virtual void AddTokenElements(buzz::XmlElement* message) override; | 
|  69  |  69  | 
|  70  private: |  70  private: | 
|  71   void OnThirdPartyTokenFetched(const base::Closure& resume_callback, |  71   void OnThirdPartyTokenFetched(const base::Closure& resume_callback, | 
|  72                                 const std::string& third_party_token, |  72                                 const std::string& third_party_token, | 
|  73                                 const std::string& shared_secret); |  73                                 const std::string& shared_secret); | 
|  74  |  74  | 
|  75   std::string token_; |  75   std::string token_; | 
|  76   scoped_ptr<TokenFetcher> token_fetcher_; |  76   scoped_ptr<TokenFetcher> token_fetcher_; | 
|  77  |  77  | 
|  78   DISALLOW_COPY_AND_ASSIGN(ThirdPartyClientAuthenticator); |  78   DISALLOW_COPY_AND_ASSIGN(ThirdPartyClientAuthenticator); | 
|  79 }; |  79 }; | 
|  80  |  80  | 
|  81  |  81  | 
|  82 }  // namespace protocol |  82 }  // namespace protocol | 
|  83 }  // namespace remoting |  83 }  // namespace remoting | 
|  84  |  84  | 
|  85 #endif  // REMOTING_PROTOCOL_THIRD_PARTY_CLIENT_AUTHENTICATOR_H_ |  85 #endif  // REMOTING_PROTOCOL_THIRD_PARTY_CLIENT_AUTHENTICATOR_H_ | 
| OLD | NEW |