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