OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/chromeos/login/user_manager_impl.h" | 5 #include "chrome/browser/chromeos/login/user_manager_impl.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1411 prefs->ClearPref(kLocallyManagedUserCreationTransactionUserId); | 1411 prefs->ClearPref(kLocallyManagedUserCreationTransactionUserId); |
1412 return; | 1412 return; |
1413 } | 1413 } |
1414 | 1414 |
1415 ListPrefUpdate prefs_users_update(prefs, kRegularUsers); | 1415 ListPrefUpdate prefs_users_update(prefs, kRegularUsers); |
1416 prefs_users_update->Remove(base::StringValue(user_id), NULL); | 1416 prefs_users_update->Remove(base::StringValue(user_id), NULL); |
1417 | 1417 |
1418 RemoveNonCryptohomeData(user_id); | 1418 RemoveNonCryptohomeData(user_id); |
1419 | 1419 |
1420 cryptohome::AsyncMethodCaller::GetInstance()->AsyncRemove( | 1420 cryptohome::AsyncMethodCaller::GetInstance()->AsyncRemove( |
1421 user_id, base::Callback<void(bool, cryptohome::MountError)>()); | 1421 user_id, base::Bind(&OnRemoveUserComplete, user_id)); |
1422 | 1422 |
1423 prefs->ClearPref(kLocallyManagedUserCreationTransactionDisplayName); | 1423 prefs->ClearPref(kLocallyManagedUserCreationTransactionDisplayName); |
1424 prefs->ClearPref(kLocallyManagedUserCreationTransactionUserId); | 1424 prefs->ClearPref(kLocallyManagedUserCreationTransactionUserId); |
1425 prefs->CommitPendingWrite(); | 1425 prefs->CommitPendingWrite(); |
1426 } | 1426 } |
1427 | 1427 |
1428 UserFlow* UserManagerImpl::GetCurrentUserFlow() const { | 1428 UserFlow* UserManagerImpl::GetCurrentUserFlow() const { |
1429 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1429 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1430 if (!IsUserLoggedIn()) | 1430 if (!IsUserLoggedIn()) |
1431 return GetDefaultUserFlow(); | 1431 return GetDefaultUserFlow(); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1548 // TODO(nkostylev): Restore all user sessions (in the background). | 1548 // TODO(nkostylev): Restore all user sessions (in the background). |
1549 // This requires first refactoring this flow out of LoginUtils. | 1549 // This requires first refactoring this flow out of LoginUtils. |
1550 // 1. UserManager::UserLoggedIn() | 1550 // 1. UserManager::UserLoggedIn() |
1551 // 2. InitSessionRestoreStrategy() (OAuth) | 1551 // 2. InitSessionRestoreStrategy() (OAuth) |
1552 // 2. ProfileManager::CreateDefaultProfileAsync() | 1552 // 2. ProfileManager::CreateDefaultProfileAsync() |
1553 // 3. InitProfilePreferences | 1553 // 3. InitProfilePreferences |
1554 // 4. chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED | 1554 // 4. chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED |
1555 } | 1555 } |
1556 | 1556 |
1557 } // namespace chromeos | 1557 } // namespace chromeos |
OLD | NEW |