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 CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REFRESH_TOKEN_FETCHER_H_ | 5 #ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REFRESH_TOKEN_FETCHER_H_ |
6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REFRESH_TOKEN_FETCHER_H_ | 6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REFRESH_TOKEN_FETCHER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 19 matching lines...) Expand all Loading... | |
30 // user and return it to the caller. The refresh token can only be used to | 30 // user and return it to the caller. The refresh token can only be used to |
31 // mint tokens with the special managed user Sync scope. | 31 // mint tokens with the special managed user Sync scope. |
32 class ManagedUserRefreshTokenFetcher { | 32 class ManagedUserRefreshTokenFetcher { |
33 public: | 33 public: |
34 typedef base::Callback<void(const GoogleServiceAuthError& /* error */, | 34 typedef base::Callback<void(const GoogleServiceAuthError& /* error */, |
35 const std::string& /* refresh_token */)> | 35 const std::string& /* refresh_token */)> |
36 TokenCallback; | 36 TokenCallback; |
37 | 37 |
38 static scoped_ptr<ManagedUserRefreshTokenFetcher> Create( | 38 static scoped_ptr<ManagedUserRefreshTokenFetcher> Create( |
39 OAuth2TokenService* oauth2_token_service, | 39 OAuth2TokenService* oauth2_token_service, |
40 const std::string& account_id, | |
Andrew T Wilson (Slow)
2013/09/03 14:04:24
This is OK and is consistent with the API changes
Roger Tawa OOO till Jul 10th
2013/09/03 21:06:42
Agreed that the |account_id| is not needed here, s
fgorski
2013/09/03 23:29:25
If we decide not to go with account_id here we'll
| |
40 net::URLRequestContextGetter* context); | 41 net::URLRequestContextGetter* context); |
41 | 42 |
42 virtual ~ManagedUserRefreshTokenFetcher(); | 43 virtual ~ManagedUserRefreshTokenFetcher(); |
43 | 44 |
44 virtual void Start(const std::string& managed_user_id, | 45 virtual void Start(const std::string& managed_user_id, |
45 const std::string& device_name, | 46 const std::string& device_name, |
46 const TokenCallback& callback) = 0; | 47 const TokenCallback& callback) = 0; |
47 }; | 48 }; |
48 | 49 |
49 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REFRESH_TOKEN_FETCHER_H_ | 50 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_USER_REFRESH_TOKEN_FETCHER_H_ |
OLD | NEW |