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 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_SYNC_FAKE_OAUTH2_TOKEN_SERVICE_H_ 6 #define CHROME_BROWSER_SYNC_FAKE_OAUTH2_TOKEN_SERVICE_H_ 7 8 #include "chrome/browser/signin/profile_oauth2_token_service.h" 9 10 namespace content { 11 class BrowserContext; 12 } 13 14 class FakeOAuth2TokenService : public ProfileOAuth2TokenService { 15 public: 16 static BrowserContextKeyedService* BuildTokenService( 17 content::BrowserContext* context); 18 19 protected: 20 virtual void FetchOAuth2Token( 21 OAuth2TokenService::RequestImpl* request, 22 const std::string& account_id, 23 net::URLRequestContextGetter* getter, 24 const std::string& client_id, 25 const std::string& client_secret, 26 const OAuth2TokenService::ScopeSet& scopes) OVERRIDE; 27 28 virtual void PersistCredentials(const std::string& account_id, 29 const std::string& refresh_token) OVERRIDE; 30 31 virtual void ClearPersistedCredentials( 32 const std::string& account_id) OVERRIDE; 33 }; 34 35 #endif // CHROME_BROWSER_SYNC_FAKE_OAUTH2_TOKEN_SERVICE_H_ 36