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

Side by Side Diff: chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc

Issue 2438063002: user_manager: Remove deps on session_manager (Closed)
Patch Set: fix nits in PS1 Created 4 years, 2 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
OLDNEW
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/chromeos/login/users/chrome_user_manager_impl.h" 5 #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <set> 10 #include <set>
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 } else if (behavior == MultiProfileUserController::kBehaviorPrimaryOnly) { 368 } else if (behavior == MultiProfileUserController::kBehaviorPrimaryOnly) {
369 NOTREACHED() 369 NOTREACHED()
370 << "Spotted primary-only multi-profile policy for non-primary user"; 370 << "Spotted primary-only multi-profile policy for non-primary user";
371 } 371 }
372 } 372 }
373 } 373 }
374 374
375 return unlock_users; 375 return unlock_users;
376 } 376 }
377 377
378 void ChromeUserManagerImpl::SessionStarted() {
379 DCHECK_CURRENTLY_ON(BrowserThread::UI);
380 ChromeUserManager::SessionStarted();
381
382 content::NotificationService::current()->Notify(
383 chrome::NOTIFICATION_SESSION_STARTED,
384 content::Source<UserManager>(this),
385 content::Details<const user_manager::User>(GetActiveUser()));
386 }
387
388 void ChromeUserManagerImpl::RemoveUserInternal( 378 void ChromeUserManagerImpl::RemoveUserInternal(
389 const AccountId& account_id, 379 const AccountId& account_id,
390 user_manager::RemoveUserDelegate* delegate) { 380 user_manager::RemoveUserDelegate* delegate) {
391 CrosSettings* cros_settings = CrosSettings::Get(); 381 CrosSettings* cros_settings = CrosSettings::Get();
392 382
393 const base::Closure& callback = 383 const base::Closure& callback =
394 base::Bind(&ChromeUserManagerImpl::RemoveUserInternal, 384 base::Bind(&ChromeUserManagerImpl::RemoveUserInternal,
395 weak_factory_.GetWeakPtr(), account_id, delegate); 385 weak_factory_.GetWeakPtr(), account_id, delegate);
396 386
397 // Ensure the value of owner email has been fetched. 387 // Ensure the value of owner email has been fetched.
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 break; 1333 break;
1344 default: 1334 default:
1345 NOTREACHED(); 1335 NOTREACHED();
1346 break; 1336 break;
1347 } 1337 }
1348 1338
1349 return user; 1339 return user;
1350 } 1340 }
1351 1341
1352 } // namespace chromeos 1342 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698