Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: remoting/client/token_fetcher_proxy.h

Issue 311983003: Third Party Authentication for Android Part I - TokenFetcherProxy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing CR feedbacks Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/client/plugin/pepper_token_fetcher.cc ('k') | remoting/client/token_fetcher_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_CLIENT_TOKEN_FETCHER_PROXY_H_
6 #define REMOTING_CLIENT_TOKEN_FETCHER_PROXY_H_
7
8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h"
10 #include "remoting/protocol/third_party_client_authenticator.h"
11
12 namespace remoting {
13
14 class TokenFetcherProxy
15 : public protocol::ThirdPartyClientAuthenticator::TokenFetcher {
16 public:
17 typedef base::Callback<void(
18 const GURL& token_url,
19 const std::string& host_public_key,
20 const std::string& scope,
21 base::WeakPtr<TokenFetcherProxy>)> TokenFetcherCallback;
22
23 TokenFetcherProxy(const TokenFetcherCallback& token_fetcher_impl,
24 const std::string& host_public_key);
25 virtual ~TokenFetcherProxy();
26
27 // protocol::TokenClientAuthenticator::TokenFetcher interface.
28 virtual void FetchThirdPartyToken(
29 const GURL& token_url,
30 const std::string& scope,
31 const TokenFetchedCallback& token_fetched_callback) OVERRIDE;
32
33 // Called by the token fetching implementation when the token is fetched.
34 void OnTokenFetched(const std::string& token,
35 const std::string& shared_secret);
36
37 private:
38 std::string host_public_key_;
39 TokenFetcherCallback token_fetcher_impl_;
40 TokenFetchedCallback token_fetched_callback_;
41 base::WeakPtrFactory<TokenFetcherProxy> weak_factory_;
42
43 DISALLOW_COPY_AND_ASSIGN(TokenFetcherProxy);
44 };
45
46 } // namespace remoting
47
48 #endif // REMOTING_CLIENT_TOKEN_FETCHER_PROXY_H_
OLDNEW
« no previous file with comments | « remoting/client/plugin/pepper_token_fetcher.cc ('k') | remoting/client/token_fetcher_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698