OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CLIENT_TOKEN_FETCHER_PROXY_H_ | 5 #ifndef REMOTING_CLIENT_TOKEN_FETCHER_PROXY_H_ |
6 #define REMOTING_CLIENT_TOKEN_FETCHER_PROXY_H_ | 6 #define REMOTING_CLIENT_TOKEN_FETCHER_PROXY_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "remoting/protocol/third_party_client_authenticator.h" | 10 #include "remoting/protocol/third_party_client_authenticator.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 base::WeakPtr<TokenFetcherProxy>)> TokenFetcherCallback; | 21 base::WeakPtr<TokenFetcherProxy>)> TokenFetcherCallback; |
22 | 22 |
23 TokenFetcherProxy(const TokenFetcherCallback& token_fetcher_impl, | 23 TokenFetcherProxy(const TokenFetcherCallback& token_fetcher_impl, |
24 const std::string& host_public_key); | 24 const std::string& host_public_key); |
25 virtual ~TokenFetcherProxy(); | 25 virtual ~TokenFetcherProxy(); |
26 | 26 |
27 // protocol::TokenClientAuthenticator::TokenFetcher interface. | 27 // protocol::TokenClientAuthenticator::TokenFetcher interface. |
28 virtual void FetchThirdPartyToken( | 28 virtual void FetchThirdPartyToken( |
29 const GURL& token_url, | 29 const GURL& token_url, |
30 const std::string& scope, | 30 const std::string& scope, |
31 const TokenFetchedCallback& token_fetched_callback) OVERRIDE; | 31 const TokenFetchedCallback& token_fetched_callback) override; |
32 | 32 |
33 // Called by the token fetching implementation when the token is fetched. | 33 // Called by the token fetching implementation when the token is fetched. |
34 void OnTokenFetched(const std::string& token, | 34 void OnTokenFetched(const std::string& token, |
35 const std::string& shared_secret); | 35 const std::string& shared_secret); |
36 | 36 |
37 private: | 37 private: |
38 std::string host_public_key_; | 38 std::string host_public_key_; |
39 TokenFetcherCallback token_fetcher_impl_; | 39 TokenFetcherCallback token_fetcher_impl_; |
40 TokenFetchedCallback token_fetched_callback_; | 40 TokenFetchedCallback token_fetched_callback_; |
41 base::WeakPtrFactory<TokenFetcherProxy> weak_factory_; | 41 base::WeakPtrFactory<TokenFetcherProxy> weak_factory_; |
42 | 42 |
43 DISALLOW_COPY_AND_ASSIGN(TokenFetcherProxy); | 43 DISALLOW_COPY_AND_ASSIGN(TokenFetcherProxy); |
44 }; | 44 }; |
45 | 45 |
46 } // namespace remoting | 46 } // namespace remoting |
47 | 47 |
48 #endif // REMOTING_CLIENT_TOKEN_FETCHER_PROXY_H_ | 48 #endif // REMOTING_CLIENT_TOKEN_FETCHER_PROXY_H_ |
OLD | NEW |