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

Side by Side Diff: chrome/browser/signin/fake_account_fetcher_service_builder.cc

Issue 1380103004: Delay fetching account info until OnRefreshTokensLoaded(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix iOs Created 5 years, 1 month 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 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 #include "chrome/browser/signin/fake_account_fetcher_service_builder.h" 5 #include "chrome/browser/signin/fake_account_fetcher_service_builder.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/signin/account_tracker_service_factory.h" 8 #include "chrome/browser/signin/account_tracker_service_factory.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/fake_account_fetcher_service.h" 11 #include "components/signin/core/browser/fake_account_fetcher_service.h"
12 #include "components/signin/core/browser/profile_oauth2_token_service.h" 12 #include "components/signin/core/browser/profile_oauth2_token_service.h"
13 13
14 // static 14 // static
15 scoped_ptr<KeyedService> FakeAccountFetcherServiceBuilder::BuildForTests( 15 scoped_ptr<KeyedService> FakeAccountFetcherServiceBuilder::BuildForTests(
16 content::BrowserContext* context) { 16 content::BrowserContext* context) {
17 FakeAccountFetcherService* service = new FakeAccountFetcherService(); 17 FakeAccountFetcherService* service = new FakeAccountFetcherService();
18 Profile* profile = Profile::FromBrowserContext(context); 18 Profile* profile = Profile::FromBrowserContext(context);
19 service->Initialize(ChromeSigninClientFactory::GetForProfile(profile), 19 service->Initialize(ChromeSigninClientFactory::GetForProfile(profile),
20 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), 20 ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
21 AccountTrackerServiceFactory::GetForProfile(profile), 21 AccountTrackerServiceFactory::GetForProfile(profile));
22 nullptr);
23 return scoped_ptr<KeyedService>(service); 22 return scoped_ptr<KeyedService>(service);
24 } 23 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698