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

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

Issue 369353002: Create a FakeAccountReconcilor that doesn't perform network requests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/signin/fake_account_reconcilor.h ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/profile_oauth2_token_service_factory.h"
10 #include "chrome/browser/signin/signin_manager_factory.h"
11
12 FakeAccountReconcilor::FakeAccountReconcilor(
13 ProfileOAuth2TokenService* token_service,
14 SigninManagerBase* signin_manager,
15 SigninClient* client) :
16 AccountReconcilor(token_service, signin_manager, client) {}
17
18
19 // static
20 KeyedService* FakeAccountReconcilor::Build(content::BrowserContext* context) {
21 Profile* profile = Profile::FromBrowserContext(context);
22 AccountReconcilor* reconcilor = new FakeAccountReconcilor(
23 ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
24 SigninManagerFactory::GetForProfile(profile),
25 ChromeSigninClientFactory::GetForProfile(profile));
26 reconcilor->Initialize(true /* start_reconcile_if_tokens_available */);
27 return reconcilor;
28 }
29
30 void FakeAccountReconcilor::GetAccountsFromCookie(
31 GetAccountsFromCookieCallback callback) {
32 std::vector<std::pair<std::string, bool> > gaia_accounts;
33 callback.Run(GoogleServiceAuthError::AuthErrorNone(), gaia_accounts);
34 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/fake_account_reconcilor.h ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698