| 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 #include "chrome/browser/signin/fake_account_tracker_service.h" | 5 #include "chrome/browser/signin/fake_account_tracker_service.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/signin/chrome_signin_client_factory.h" | 9 #include "chrome/browser/signin/chrome_signin_client_factory.h" |
| 10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 11 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 11 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
| 12 | 12 |
| 13 // static | 13 // static |
| 14 KeyedService* FakeAccountTrackerService::Build( | 14 scoped_ptr<KeyedService> FakeAccountTrackerService::Build( |
| 15 content::BrowserContext* context) { | 15 content::BrowserContext* context) { |
| 16 Profile* profile = Profile::FromBrowserContext(context); | 16 Profile* profile = Profile::FromBrowserContext(context); |
| 17 FakeAccountTrackerService* service = new FakeAccountTrackerService(); | 17 FakeAccountTrackerService* service = new FakeAccountTrackerService(); |
| 18 service->Initialize( | 18 service->Initialize( |
| 19 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), | 19 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), |
| 20 ChromeSigninClientFactory::GetForProfile(profile)); | 20 ChromeSigninClientFactory::GetForProfile(profile)); |
| 21 return service; | 21 return scoped_ptr<KeyedService>(service); |
| 22 } | 22 } |
| 23 | 23 |
| 24 FakeAccountTrackerService::FakeAccountTrackerService() {} | 24 FakeAccountTrackerService::FakeAccountTrackerService() {} |
| 25 | 25 |
| 26 FakeAccountTrackerService::~FakeAccountTrackerService() {} | 26 FakeAccountTrackerService::~FakeAccountTrackerService() {} |
| 27 | 27 |
| 28 void FakeAccountTrackerService::StartFetchingUserInfo( | 28 void FakeAccountTrackerService::StartFetchingUserInfo( |
| 29 const std::string& account_id) { | 29 const std::string& account_id) { |
| 30 // In tests, don't do actual network fetch. | 30 // In tests, don't do actual network fetch. |
| 31 } | 31 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 48 user_info.SetString("picture", picture_url); | 48 user_info.SetString("picture", picture_url); |
| 49 std::vector<std::string> service_flags; | 49 std::vector<std::string> service_flags; |
| 50 SetAccountStateFromUserInfo( | 50 SetAccountStateFromUserInfo( |
| 51 PickAccountIdForAccount(gaia, email), &user_info, &service_flags); | 51 PickAccountIdForAccount(gaia, email), &user_info, &service_flags); |
| 52 } | 52 } |
| 53 | 53 |
| 54 void FakeAccountTrackerService::SendRefreshTokenAnnotationRequest( | 54 void FakeAccountTrackerService::SendRefreshTokenAnnotationRequest( |
| 55 const std::string& account_id) { | 55 const std::string& account_id) { |
| 56 // In tests, don't do actual network fetch. | 56 // In tests, don't do actual network fetch. |
| 57 } | 57 } |
| OLD | NEW |