OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/ui/cocoa/profiles/user_manager_mac.h" | 5 #include "chrome/browser/ui/cocoa/profiles/user_manager_mac.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "chrome/browser/profiles/profile_attributes_entry.h" | 9 #include "chrome/browser/profiles/profile_attributes_entry.h" |
10 #include "chrome/browser/profiles/profile_attributes_storage.h" | 10 #include "chrome/browser/profiles/profile_attributes_storage.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // Set the ProfileLastUsed pref so that SetActiveProfileToGuestIfLocked() uses | 50 // Set the ProfileLastUsed pref so that SetActiveProfileToGuestIfLocked() uses |
51 // a last active profile that's in the ProfileAttributesStorage, not default. | 51 // a last active profile that's in the ProfileAttributesStorage, not default. |
52 g_browser_process->local_state()->SetString( | 52 g_browser_process->local_state()->SetString( |
53 prefs::kProfileLastUsed, | 53 prefs::kProfileLastUsed, |
54 g_browser_process->profile_manager()->GetProfileAttributesStorage(). | 54 g_browser_process->profile_manager()->GetProfileAttributesStorage(). |
55 GetAllProfilesAttributes().front()-> | 55 GetAllProfilesAttributes().front()-> |
56 GetPath().BaseName().MaybeAsASCII()); | 56 GetPath().BaseName().MaybeAsASCII()); |
57 | 57 |
58 EXPECT_FALSE(UserManager::IsShowing()); | 58 EXPECT_FALSE(UserManager::IsShowing()); |
59 UserManager::Show(base::FilePath(), | 59 UserManager::Show(base::FilePath(), |
60 profiles::USER_MANAGER_NO_TUTORIAL, | |
61 profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION); | 60 profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION); |
62 EXPECT_TRUE(UserManager::IsShowing()); | 61 EXPECT_TRUE(UserManager::IsShowing()); |
63 | 62 |
64 UserManager::Hide(); | 63 UserManager::Hide(); |
65 EXPECT_FALSE(UserManager::IsShowing()); | 64 EXPECT_FALSE(UserManager::IsShowing()); |
66 } | 65 } |
OLD | NEW |