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

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

Issue 1091363002: Change ProfileDownloader to use AccountTrackerService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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"
(...skipping 13 matching lines...) Expand all
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 }
32 32
33 void FakeAccountTrackerService::FakeUserInfoFetchSuccess( 33 void FakeAccountTrackerService::FakeUserInfoFetchSuccess(
34 const std::string& account_id,
35 const std::string& email, 34 const std::string& email,
36 const std::string& gaia, 35 const std::string& gaia,
37 const std::string& hosted_domain) { 36 const std::string& hosted_domain,
37 const std::string& full_name,
38 const std::string& given_name,
39 const std::string& locale,
40 const std::string& picture_url) {
38 base::DictionaryValue user_info; 41 base::DictionaryValue user_info;
39 user_info.SetString("id", gaia); 42 user_info.SetString("id", gaia);
40 user_info.SetString("email", email); 43 user_info.SetString("email", email);
41 user_info.SetString("hd", hosted_domain); 44 user_info.SetString("hd", hosted_domain);
42 SetAccountStateFromUserInfo(account_id, &user_info); 45 user_info.SetString("name", full_name);
46 user_info.SetString("given_name", given_name);
47 user_info.SetString("locale", locale);
48 user_info.SetString("picture", picture_url);
49 SetAccountStateFromUserInfo(PickAccountIdForAccount(gaia, email), &user_info);
43 } 50 }
44 51
45 void FakeAccountTrackerService::SendRefreshTokenAnnotationRequest( 52 void FakeAccountTrackerService::SendRefreshTokenAnnotationRequest(
46 const std::string& account_id) { 53 const std::string& account_id) {
47 // In tests, don't do actual network fetch. 54 // In tests, don't do actual network fetch.
48 } 55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698