Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: chrome/browser/chromeos/login/user_manager_impl.cc

Issue 16104006: Do not use empty callback when cleaning up managed users (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698