| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_SIGNIN_FAKE_ACCOUNT_TRACKER_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_FAKE_ACCOUNT_TRACKER_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SIGNIN_FAKE_ACCOUNT_TRACKER_SERVICE_H_ | 6 #define CHROME_BROWSER_SIGNIN_FAKE_ACCOUNT_TRACKER_SERVICE_H_ |
| 7 | 7 |
| 8 #include "components/signin/core/browser/account_tracker_service.h" | 8 #include "components/signin/core/browser/account_tracker_service.h" |
| 9 | 9 |
| 10 class KeyedService; | 10 class KeyedService; |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 class BrowserContext; | 13 class BrowserContext; |
| 14 } | 14 } |
| 15 | 15 |
| 16 // AccountTrackerService is a KeyedService that retrieves and caches GAIA | 16 // AccountTrackerService is a KeyedService that retrieves and caches GAIA |
| 17 // information about Google Accounts. This fake class can be used in tests | 17 // information about Google Accounts. This fake class can be used in tests |
| 18 // to prevent AccountTrackerService from sending network requests. | 18 // to prevent AccountTrackerService from sending network requests. |
| 19 class FakeAccountTrackerService : public AccountTrackerService { | 19 class FakeAccountTrackerService : public AccountTrackerService { |
| 20 public: | 20 public: |
| 21 static KeyedService* Build(content::BrowserContext* context); | 21 static KeyedService* Build(content::BrowserContext* context); |
| 22 | 22 |
| 23 private: | 23 private: |
| 24 FakeAccountTrackerService(); | 24 FakeAccountTrackerService(); |
| 25 virtual ~FakeAccountTrackerService(); | 25 virtual ~FakeAccountTrackerService(); |
| 26 | 26 |
| 27 virtual void StartFetchingUserInfo(const std::string& account_id) OVERRIDE; | 27 virtual void StartFetchingUserInfo(const std::string& account_id) override; |
| 28 | 28 |
| 29 DISALLOW_COPY_AND_ASSIGN(FakeAccountTrackerService); | 29 DISALLOW_COPY_AND_ASSIGN(FakeAccountTrackerService); |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 #endif // CHROME_BROWSER_SIGNIN_FAKE_ACCOUNT_TRACKER_SERVICE_H_ | 32 #endif // CHROME_BROWSER_SIGNIN_FAKE_ACCOUNT_TRACKER_SERVICE_H_ |
| OLD | NEW |