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

Side by Side Diff: components/cryptauth/cryptauth_access_token_fetcher_impl.h

Issue 2502343003: Moved //components/proximity_auth/cryptauth to //components/cryptauth. (Closed)
Patch Set: Prefixed two test names with "CryptAuth" so that they do not collide with other test names. Created 4 years, 1 month 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
OLDNEW
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 COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_ACCESS_TOKEN_FETCHER_IMPL_H 5 #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_ACCESS_TOKEN_FETCHER_IMPL_H
6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_ACCESS_TOKEN_FETCHER_IMPL_H 6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_ACCESS_TOKEN_FETCHER_IMPL_H
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h" 12 #include "components/cryptauth/cryptauth_access_token_fetcher.h"
13 #include "google_apis/gaia/oauth2_token_service.h" 13 #include "google_apis/gaia/oauth2_token_service.h"
14 14
15 namespace proximity_auth { 15 namespace cryptauth {
16 16
17 // Implementation of CryptAuthAccessTokenFetcher fetching an access token for a 17 // Implementation of CryptAuthAccessTokenFetcher fetching an access token for a
18 // given account using the provided OAuth2TokenService. 18 // given account using the provided OAuth2TokenService.
19 class CryptAuthAccessTokenFetcherImpl : public CryptAuthAccessTokenFetcher, 19 class CryptAuthAccessTokenFetcherImpl : public CryptAuthAccessTokenFetcher,
20 public OAuth2TokenService::Consumer { 20 public OAuth2TokenService::Consumer {
21 public: 21 public:
22 // |token_service| is not owned, and must outlive this object. 22 // |token_service| is not owned, and must outlive this object.
23 CryptAuthAccessTokenFetcherImpl(OAuth2TokenService* token_service, 23 CryptAuthAccessTokenFetcherImpl(OAuth2TokenService* token_service,
24 const std::string& account_id); 24 const std::string& account_id);
25 ~CryptAuthAccessTokenFetcherImpl() override; 25 ~CryptAuthAccessTokenFetcherImpl() override;
(...skipping 21 matching lines...) Expand all
47 47
48 // Stores the request from |token_service_| to mint the token. 48 // Stores the request from |token_service_| to mint the token.
49 std::unique_ptr<OAuth2TokenService::Request> token_request_; 49 std::unique_ptr<OAuth2TokenService::Request> token_request_;
50 50
51 // Callback to invoke when the token fetch succeeds or fails. 51 // Callback to invoke when the token fetch succeeds or fails.
52 AccessTokenCallback callback_; 52 AccessTokenCallback callback_;
53 53
54 DISALLOW_COPY_AND_ASSIGN(CryptAuthAccessTokenFetcherImpl); 54 DISALLOW_COPY_AND_ASSIGN(CryptAuthAccessTokenFetcherImpl);
55 }; 55 };
56 56
57 } // namespace proximity_auth 57 } // namespace cryptauth
58 58
59 #endif // COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_ACCESS_TOKEN_FETCHER_IMPL_H 59 #endif // COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_ACCESS_TOKEN_FETCHER_IMPL_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698