Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: chrome/browser/signin/fake_account_tracker_service.h

Issue 1165913002: [Cleanup] Used scoped pointers in KeyedServiceFactory's SetTestingFactory functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/memory/scoped_ptr.h"
8 #include "components/signin/core/browser/account_tracker_service.h" 9 #include "components/signin/core/browser/account_tracker_service.h"
9 10
10 class KeyedService; 11 class KeyedService;
11 12
12 namespace content { 13 namespace content {
13 class BrowserContext; 14 class BrowserContext;
14 } 15 }
15 16
16 // AccountTrackerService is a KeyedService that retrieves and caches GAIA 17 // AccountTrackerService is a KeyedService that retrieves and caches GAIA
17 // information about Google Accounts. This fake class can be used in tests 18 // information about Google Accounts. This fake class can be used in tests
18 // to prevent AccountTrackerService from sending network requests. 19 // to prevent AccountTrackerService from sending network requests.
19 class FakeAccountTrackerService : public AccountTrackerService { 20 class FakeAccountTrackerService : public AccountTrackerService {
20 public: 21 public:
21 static KeyedService* Build(content::BrowserContext* context); 22 static scoped_ptr<KeyedService> Build(content::BrowserContext* context);
22 23
23 void FakeUserInfoFetchSuccess(const std::string& email, 24 void FakeUserInfoFetchSuccess(const std::string& email,
24 const std::string& gaia, 25 const std::string& gaia,
25 const std::string& hosted_domain, 26 const std::string& hosted_domain,
26 const std::string& full_name, 27 const std::string& full_name,
27 const std::string& given_name, 28 const std::string& given_name,
28 const std::string& locale, 29 const std::string& locale,
29 const std::string& picture_url); 30 const std::string& picture_url);
30 31
31 private: 32 private:
32 FakeAccountTrackerService(); 33 FakeAccountTrackerService();
33 ~FakeAccountTrackerService() override; 34 ~FakeAccountTrackerService() override;
34 35
35 void StartFetchingUserInfo(const std::string& account_id) override; 36 void StartFetchingUserInfo(const std::string& account_id) override;
36 void SendRefreshTokenAnnotationRequest( 37 void SendRefreshTokenAnnotationRequest(
37 const std::string& account_id) override; 38 const std::string& account_id) override;
38 39
39 DISALLOW_COPY_AND_ASSIGN(FakeAccountTrackerService); 40 DISALLOW_COPY_AND_ASSIGN(FakeAccountTrackerService);
40 }; 41 };
41 42
42 #endif // CHROME_BROWSER_SIGNIN_FAKE_ACCOUNT_TRACKER_SERVICE_H_ 43 #endif // CHROME_BROWSER_SIGNIN_FAKE_ACCOUNT_TRACKER_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698