OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 COMPONENTS_SIGNIN_CORE_BROWSER_FAKE_ACCOUNT_FETCHER_SERVICE_H_ | 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_FAKE_ACCOUNT_FETCHER_SERVICE_H_ |
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_FAKE_ACCOUNT_FETCHER_SERVICE_H_ | 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_FAKE_ACCOUNT_FETCHER_SERVICE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "components/signin/core/browser/account_fetcher_service.h" | 11 #include "components/signin/core/browser/account_fetcher_service.h" |
12 | 12 |
13 class KeyedService; | 13 class KeyedService; |
14 | 14 |
15 namespace content { | |
16 class BrowserContext; | |
17 } | |
18 | |
19 // AccountTrackerService is a KeyedService that retrieves and caches GAIA | 15 // AccountTrackerService is a KeyedService that retrieves and caches GAIA |
20 // information about Google Accounts. This fake class can be used in tests | 16 // information about Google Accounts. This fake class can be used in tests |
21 // to prevent AccountTrackerService from sending network requests. | 17 // to prevent AccountTrackerService from sending network requests. |
22 class FakeAccountFetcherService : public AccountFetcherService { | 18 class FakeAccountFetcherService : public AccountFetcherService { |
23 public: | 19 public: |
24 void FakeUserInfoFetchSuccess(const std::string& email, | 20 void FakeUserInfoFetchSuccess(const std::string& email, |
25 const std::string& gaia, | 21 const std::string& gaia, |
26 const std::string& hosted_domain, | 22 const std::string& hosted_domain, |
27 const std::string& full_name, | 23 const std::string& full_name, |
28 const std::string& given_name, | 24 const std::string& given_name, |
(...skipping 15 matching lines...) Expand all Loading... |
44 private: | 40 private: |
45 void StartFetchingUserInfo(const std::string& account_id) override; | 41 void StartFetchingUserInfo(const std::string& account_id) override; |
46 void StartFetchingChildInfo(const std::string& account_id) override; | 42 void StartFetchingChildInfo(const std::string& account_id) override; |
47 void SendRefreshTokenAnnotationRequest( | 43 void SendRefreshTokenAnnotationRequest( |
48 const std::string& account_id) override; | 44 const std::string& account_id) override; |
49 | 45 |
50 DISALLOW_COPY_AND_ASSIGN(FakeAccountFetcherService); | 46 DISALLOW_COPY_AND_ASSIGN(FakeAccountFetcherService); |
51 }; | 47 }; |
52 | 48 |
53 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_FAKE_ACCOUNT_FETCHER_SERVICE_H_ | 49 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_FAKE_ACCOUNT_FETCHER_SERVICE_H_ |
OLD | NEW |