| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 existing_user_controller_.reset( | 168 existing_user_controller_.reset( |
| 169 new ExistingUserController(mock_login_display_host_.get())); | 169 new ExistingUserController(mock_login_display_host_.get())); |
| 170 ASSERT_EQ(existing_user_controller(), existing_user_controller_.get()); | 170 ASSERT_EQ(existing_user_controller(), existing_user_controller_.get()); |
| 171 existing_user_controller_->Init(UserList()); | 171 existing_user_controller_->Init(UserList()); |
| 172 profile_prepared_cb_ = | 172 profile_prepared_cb_ = |
| 173 base::Bind(&ExistingUserController::OnProfilePrepared, | 173 base::Bind(&ExistingUserController::OnProfilePrepared, |
| 174 base::Unretained(existing_user_controller()), | 174 base::Unretained(existing_user_controller()), |
| 175 testing_profile_.get()); | 175 testing_profile_.get()); |
| 176 } | 176 } |
| 177 | 177 |
| 178 virtual void CleanUpOnMainThread() OVERRIDE { | 178 virtual void TearDownOnMainThread() OVERRIDE { |
| 179 // ExistingUserController must be deleted before the thread is cleaned up: | 179 // ExistingUserController must be deleted before the thread is cleaned up: |
| 180 // If there is an outstanding login attempt when ExistingUserController is | 180 // If there is an outstanding login attempt when ExistingUserController is |
| 181 // deleted, its LoginPerformer instance will be deleted, which in turn | 181 // deleted, its LoginPerformer instance will be deleted, which in turn |
| 182 // deletes its OnlineAttemptHost instance. However, OnlineAttemptHost must | 182 // deletes its OnlineAttemptHost instance. However, OnlineAttemptHost must |
| 183 // be deleted on the UI thread. | 183 // be deleted on the UI thread. |
| 184 existing_user_controller_.reset(); | 184 existing_user_controller_.reset(); |
| 185 DevicePolicyCrosBrowserTest::InProcessBrowserTest::CleanUpOnMainThread(); | 185 DevicePolicyCrosBrowserTest::InProcessBrowserTest::TearDownOnMainThread(); |
| 186 testing_profile_.reset(NULL); | 186 testing_profile_.reset(NULL); |
| 187 user_manager_enabler_.reset(); | 187 user_manager_enabler_.reset(); |
| 188 } | 188 } |
| 189 | 189 |
| 190 // ExistingUserController private member accessors. | 190 // ExistingUserController private member accessors. |
| 191 base::OneShotTimer<ExistingUserController>* auto_login_timer() { | 191 base::OneShotTimer<ExistingUserController>* auto_login_timer() { |
| 192 return existing_user_controller()->auto_login_timer_.get(); | 192 return existing_user_controller()->auto_login_timer_.get(); |
| 193 } | 193 } |
| 194 | 194 |
| 195 const std::string& auto_login_username() const { | 195 const std::string& auto_login_username() const { |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 PRE_TestLoadingPublicUsersFromLocalState) { | 672 PRE_TestLoadingPublicUsersFromLocalState) { |
| 673 // First run propagates public accounts and stores them in Local State. | 673 // First run propagates public accounts and stores them in Local State. |
| 674 } | 674 } |
| 675 | 675 |
| 676 IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, | 676 IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, |
| 677 TestLoadingPublicUsersFromLocalState) { | 677 TestLoadingPublicUsersFromLocalState) { |
| 678 // Second run loads list of public accounts from Local State. | 678 // Second run loads list of public accounts from Local State. |
| 679 } | 679 } |
| 680 | 680 |
| 681 } // namespace chromeos | 681 } // namespace chromeos |
| OLD | NEW |