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

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

Issue 1075273002: Handle ListAccount fetches from within the GaiaCookieManagerService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a test post rebase Created 5 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/signin/fake_account_reconcilor.h"
6
7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/signin/chrome_signin_client_factory.h"
9 #include "chrome/browser/signin/gaia_cookie_manager_service_factory.h"
10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
11 #include "chrome/browser/signin/signin_manager_factory.h"
12
13 FakeAccountReconcilor::FakeAccountReconcilor(
14 ProfileOAuth2TokenService* token_service,
15 SigninManagerBase* signin_manager,
16 SigninClient* client,
17 GaiaCookieManagerService* cookie_manager_service) :
18 AccountReconcilor(
19 token_service, signin_manager, client, cookie_manager_service) {}
20
21
22 // static
23 KeyedService* FakeAccountReconcilor::Build(content::BrowserContext* context) {
24 Profile* profile = Profile::FromBrowserContext(context);
25 AccountReconcilor* reconcilor = new FakeAccountReconcilor(
26 ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
27 SigninManagerFactory::GetForProfile(profile),
28 ChromeSigninClientFactory::GetForProfile(profile),
29 GaiaCookieManagerServiceFactory::GetForProfile(profile));
30 reconcilor->Initialize(true /* start_reconcile_if_tokens_available */);
31 return reconcilor;
32 }
33
34 void FakeAccountReconcilor::GetAccountsFromCookie(
35 GetAccountsFromCookieCallback callback) {
36 std::vector<std::pair<std::string, bool> > gaia_accounts;
37 callback.Run(GoogleServiceAuthError::AuthErrorNone(), gaia_accounts);
38 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/fake_account_reconcilor.h ('k') | chrome/browser/signin/fake_gaia_cookie_manager_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698