| OLD | NEW |
| 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 <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 1, | 193 1, |
| 194 HelpAppLauncher::HELP_CANT_ACCESS_ACCOUNT)) | 194 HelpAppLauncher::HELP_CANT_ACCESS_ACCOUNT)) |
| 195 .Times(1); | 195 .Times(1); |
| 196 EXPECT_CALL(*mock_login_display_, SetUIEnabled(true)) | 196 EXPECT_CALL(*mock_login_display_, SetUIEnabled(true)) |
| 197 .Times(1); | 197 .Times(1); |
| 198 } | 198 } |
| 199 | 199 |
| 200 void RegisterUser(const std::string& user_id) { | 200 void RegisterUser(const std::string& user_id) { |
| 201 ListPrefUpdate users_pref(g_browser_process->local_state(), | 201 ListPrefUpdate users_pref(g_browser_process->local_state(), |
| 202 "LoggedInUsers"); | 202 "LoggedInUsers"); |
| 203 users_pref->AppendIfNotPresent( | 203 users_pref->AppendIfNotPresent(base::MakeUnique<base::Value>(user_id)); |
| 204 base::MakeUnique<base::StringValue>(user_id)); | |
| 205 } | 204 } |
| 206 | 205 |
| 207 // ExistingUserController private member accessors. | 206 // ExistingUserController private member accessors. |
| 208 base::OneShotTimer* auto_login_timer() { | 207 base::OneShotTimer* auto_login_timer() { |
| 209 return existing_user_controller()->auto_login_timer_.get(); | 208 return existing_user_controller()->auto_login_timer_.get(); |
| 210 } | 209 } |
| 211 | 210 |
| 212 AccountId auto_login_account_id() const { | 211 AccountId auto_login_account_id() const { |
| 213 return existing_user_controller()->public_session_auto_login_account_id_; | 212 return existing_user_controller()->public_session_auto_login_account_id_; |
| 214 } | 213 } |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 GAIAAccountLogin_Failure) { | 838 GAIAAccountLogin_Failure) { |
| 840 ExpectLoginFailure(); | 839 ExpectLoginFailure(); |
| 841 EXPECT_CALL(*mock_login_display_host_, OnCompleteLogin()).Times(1); | 840 EXPECT_CALL(*mock_login_display_host_, OnCompleteLogin()).Times(1); |
| 842 UserContext user_context(gaia_account_id_); | 841 UserContext user_context(gaia_account_id_); |
| 843 user_context.SetKey(Key(kPassword)); | 842 user_context.SetKey(Key(kPassword)); |
| 844 user_context.SetUserIDHash(gaia_account_id_.GetUserEmail()); | 843 user_context.SetUserIDHash(gaia_account_id_.GetUserEmail()); |
| 845 existing_user_controller()->CompleteLogin(user_context); | 844 existing_user_controller()->CompleteLogin(user_context); |
| 846 } | 845 } |
| 847 | 846 |
| 848 } // namespace chromeos | 847 } // namespace chromeos |
| OLD | NEW |