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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 ExistingUserControllerPublicSessionTest() | 344 ExistingUserControllerPublicSessionTest() |
345 : public_session_user_id_(policy::GenerateDeviceLocalAccountUserId( | 345 : public_session_user_id_(policy::GenerateDeviceLocalAccountUserId( |
346 kPublicSessionAccountId, | 346 kPublicSessionAccountId, |
347 policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION)) { | 347 policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION)) { |
348 } | 348 } |
349 | 349 |
350 virtual void SetUpOnMainThread() OVERRIDE { | 350 virtual void SetUpOnMainThread() OVERRIDE { |
351 ExistingUserControllerTest::SetUpOnMainThread(); | 351 ExistingUserControllerTest::SetUpOnMainThread(); |
352 | 352 |
353 // Wait for the public session user to be created. | 353 // Wait for the public session user to be created. |
354 if (!chromeos::UserManager::Get()->IsKnownUser(public_session_user_id_)) { | 354 if (!chromeos::GetUserManager()->IsKnownUser(public_session_user_id_)) { |
355 content::WindowedNotificationObserver( | 355 content::WindowedNotificationObserver( |
356 chrome::NOTIFICATION_USER_LIST_CHANGED, | 356 chrome::NOTIFICATION_USER_LIST_CHANGED, |
357 base::Bind(&chromeos::UserManager::IsKnownUser, | 357 base::Bind(&chromeos::UserManager::IsKnownUser, |
358 base::Unretained(chromeos::UserManager::Get()), | 358 base::Unretained(chromeos::GetUserManager()), |
359 public_session_user_id_)).Wait(); | 359 public_session_user_id_)).Wait(); |
360 } | 360 } |
361 | 361 |
362 // Wait for the device local account policy to be installed. | 362 // Wait for the device local account policy to be installed. |
363 policy::CloudPolicyStore* store = | 363 policy::CloudPolicyStore* store = |
364 TestingBrowserProcess::GetGlobal() | 364 TestingBrowserProcess::GetGlobal() |
365 ->platform_part() | 365 ->platform_part() |
366 ->browser_policy_connector_chromeos() | 366 ->browser_policy_connector_chromeos() |
367 ->GetDeviceLocalAccountPolicyService() | 367 ->GetDeviceLocalAccountPolicyService() |
368 ->GetBrokerForUser(public_session_user_id_) | 368 ->GetBrokerForUser(public_session_user_id_) |
(...skipping 303 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 |