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

Side by Side Diff: chrome/browser/managed_mode/managed_user_refresh_token_fetcher.h

Issue 23382008: Making OAuth2TokenService multi-login aware, updating callers, minor fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing to include the update to ProfileSyncService: r224220 Created 7 years, 3 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
OLDNEW
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
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,
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698