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

Side by Side Diff: components/signin/core/browser/fake_signin_manager.cc

Issue 1487283005: Implement the new Sync Confirmation dialog on Linux and Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Mac/ChromeOS builds and iOS tests. Created 4 years, 10 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
« no previous file with comments | « chrome/test/base/test_browser_window.h ('k') | ui/webui/resources/webui_resources.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/signin/core/browser/fake_signin_manager.h" 5 #include "components/signin/core/browser/fake_signin_manager.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "components/signin/core/browser/account_tracker_service.h" 10 #include "components/signin/core/browser/account_tracker_service.h"
(...skipping 24 matching lines...) Expand all
35 const std::string& refresh_token, 35 const std::string& refresh_token,
36 const std::string& gaia_id, 36 const std::string& gaia_id,
37 const std::string& username, 37 const std::string& username,
38 const std::string& password, 38 const std::string& password,
39 const OAuthTokenFetchedCallback& oauth_fetched_callback) { 39 const OAuthTokenFetchedCallback& oauth_fetched_callback) {
40 set_auth_in_progress( 40 set_auth_in_progress(
41 account_tracker_service()->SeedAccountInfo(gaia_id, username)); 41 account_tracker_service()->SeedAccountInfo(gaia_id, username));
42 set_password(password); 42 set_password(password);
43 username_ = username; 43 username_ = username;
44 44
45 possibly_invalid_gaia_id_.assign(gaia_id);
46 possibly_invalid_email_.assign(username);
47
45 if (!oauth_fetched_callback.is_null()) 48 if (!oauth_fetched_callback.is_null())
46 oauth_fetched_callback.Run(refresh_token); 49 oauth_fetched_callback.Run(refresh_token);
47 } 50 }
48 51
49 void FakeSigninManager::CompletePendingSignin() { 52 void FakeSigninManager::CompletePendingSignin() {
50 SetAuthenticatedAccountId(GetAccountIdForAuthInProgress()); 53 SetAuthenticatedAccountId(GetAccountIdForAuthInProgress());
51 set_auth_in_progress(std::string()); 54 set_auth_in_progress(std::string());
52 FOR_EACH_OBSERVER( 55 FOR_EACH_OBSERVER(
53 SigninManagerBase::Observer, observer_list_, 56 SigninManagerBase::Observer, observer_list_,
54 GoogleSigninSucceeded(authenticated_account_id_, username_, password_)); 57 GoogleSigninSucceeded(authenticated_account_id_, username_, password_));
(...skipping 27 matching lines...) Expand all
82 set_password(std::string()); 85 set_password(std::string());
83 const std::string account_id = GetAuthenticatedAccountId(); 86 const std::string account_id = GetAuthenticatedAccountId();
84 const std::string username = GetAuthenticatedAccountInfo().email; 87 const std::string username = GetAuthenticatedAccountInfo().email;
85 authenticated_account_id_.clear(); 88 authenticated_account_id_.clear();
86 89
87 FOR_EACH_OBSERVER(SigninManagerBase::Observer, observer_list_, 90 FOR_EACH_OBSERVER(SigninManagerBase::Observer, observer_list_,
88 GoogleSignedOut(account_id, username)); 91 GoogleSignedOut(account_id, username));
89 } 92 }
90 93
91 #endif // !defined (OS_CHROMEOS) 94 #endif // !defined (OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/test/base/test_browser_window.h ('k') | ui/webui/resources/webui_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698