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_SIGNIN_FAKE_ACCOUNT_TRACKER_SERVICE_H_
6 #define CHROME_BROWSER_SIGNIN_FAKE_ACCOUNT_TRACKER_SERVICE_H_
8 #include "components/signin/core/browser/account_tracker_service.h"
16 // AccountTrackerService is a KeyedService that retrieves and caches GAIA
17 // information about Google Accounts. This fake class can be used in tests
18 // to prevent AccountTrackerService from sending network requests.
19 class FakeAccountTrackerService
: public AccountTrackerService
{
21 static KeyedService
* Build(content::BrowserContext
* context
);
23 void FakeUserInfoFetchSuccess(const std::string
& account_id
,
24 const std::string
& email
,
25 const std::string
& gaia
,
26 const std::string
& hosted_domain
);
29 FakeAccountTrackerService();
30 ~FakeAccountTrackerService() override
;
32 void StartFetchingUserInfo(const std::string
& account_id
) override
;
33 void SendRefreshTokenAnnotationRequest(
34 const std::string
& account_id
) override
;
36 DISALLOW_COPY_AND_ASSIGN(FakeAccountTrackerService
);
39 #endif // CHROME_BROWSER_SIGNIN_FAKE_ACCOUNT_TRACKER_SERVICE_H_