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.
5 #ifndef CHROME_BROWSER_SYNC_FAKE_OAUTH2_TOKEN_SERVICE_FOR_SYNC_H_
6 #define CHROME_BROWSER_SYNC_FAKE_OAUTH2_TOKEN_SERVICE_FOR_SYNC_H_
8 #include "chrome/browser/signin/profile_oauth2_token_service.h"
14 class FakeOAuth2TokenServiceForSync
: public ProfileOAuth2TokenService
{
16 static BrowserContextKeyedService
* BuildTokenService(
17 content::BrowserContext
* context
);
19 virtual bool RefreshTokenIsAvailable(
20 const std::string
& account_id
) OVERRIDE
;
22 virtual void UpdateCredentials(const std::string
& account_id
,
23 const std::string
& refresh_token
) OVERRIDE
;
26 virtual void FetchOAuth2Token(
27 OAuth2TokenService::RequestImpl
* request
,
28 const std::string
& account_id
,
29 net::URLRequestContextGetter
* getter
,
30 const std::string
& client_id
,
31 const std::string
& client_secret
,
32 const OAuth2TokenService::ScopeSet
& scopes
) OVERRIDE
;
35 std::string account_id_
;
36 std::string refresh_token_
;
39 #endif // CHROME_BROWSER_SYNC_FAKE_OAUTH2_TOKEN_SERVICE_FOR_SYNC_H_