Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / signin / fake_account_fetcher_service.h
blobd8408778b33a8752e657e805c2289a2140d439a1
1 // Copyright 2015 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_FETCHER_SERVICE_H_
6 #define CHROME_BROWSER_SIGNIN_FAKE_ACCOUNT_FETCHER_SERVICE_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "components/signin/core/browser/account_fetcher_service.h"
11 class KeyedService;
13 namespace content {
14 class BrowserContext;
17 // AccountTrackerService is a KeyedService that retrieves and caches GAIA
18 // information about Google Accounts. This fake class can be used in tests
19 // to prevent AccountTrackerService from sending network requests.
20 class FakeAccountFetcherService : public AccountFetcherService {
21 public:
22 void FakeUserInfoFetchSuccess(const std::string& email,
23 const std::string& gaia,
24 const std::string& hosted_domain,
25 const std::string& full_name,
26 const std::string& given_name,
27 const std::string& locale,
28 const std::string& picture_url);
30 static scoped_ptr<KeyedService> BuildForTests(
31 content::BrowserContext* context);
33 FakeAccountFetcherService();
34 ~FakeAccountFetcherService() override;
36 private:
37 void StartFetchingUserInfo(const std::string& account_id) override;
38 void StartFetchingChildInfo(const std::string& account_id) override;
39 void SendRefreshTokenAnnotationRequest(
40 const std::string& account_id) override;
42 DISALLOW_COPY_AND_ASSIGN(FakeAccountFetcherService);
45 #endif // CHROME_BROWSER_SIGNIN_FAKE_ACCOUNT_FETCHER_SERVICE_H_