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

Side by Side Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 2416763002: Replace FOR_EACH_OBSERVER in c/b/chromeos with range-based for (Closed)
Patch Set: 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/session/user_session_manager.h" 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1522 this); 1522 this);
1523 } else { 1523 } else {
1524 RestorePendingUserSessions(); 1524 RestorePendingUserSessions();
1525 } 1525 }
1526 } 1526 }
1527 1527
1528 void UserSessionManager::NotifyPendingUserSessionsRestoreFinished() { 1528 void UserSessionManager::NotifyPendingUserSessionsRestoreFinished() {
1529 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 1529 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
1530 user_sessions_restored_ = true; 1530 user_sessions_restored_ = true;
1531 user_sessions_restore_in_progress_ = false; 1531 user_sessions_restore_in_progress_ = false;
1532 FOR_EACH_OBSERVER(chromeos::UserSessionStateObserver, 1532 for (auto& observer : session_state_observer_list_)
1533 session_state_observer_list_, 1533 observer.PendingUserSessionsRestoreFinished();
1534 PendingUserSessionsRestoreFinished());
1535 } 1534 }
1536 1535
1537 void UserSessionManager::UpdateEasyUnlockKeys(const UserContext& user_context) { 1536 void UserSessionManager::UpdateEasyUnlockKeys(const UserContext& user_context) {
1538 // Skip key update because FakeCryptohomeClient always return success 1537 // Skip key update because FakeCryptohomeClient always return success
1539 // and RefreshKeys op expects a failure to stop. As a result, some tests would 1538 // and RefreshKeys op expects a failure to stop. As a result, some tests would
1540 // timeout. 1539 // timeout.
1541 // TODO(xiyuan): Revisit this when adding tests. 1540 // TODO(xiyuan): Revisit this when adding tests.
1542 if (!base::SysInfo::IsRunningOnChromeOS()) 1541 if (!base::SysInfo::IsRunningOnChromeOS())
1543 return; 1542 return;
1544 1543
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1893 ->browser_policy_connector_chromeos() 1892 ->browser_policy_connector_chromeos()
1894 ->IsEnterpriseManaged()) { 1893 ->IsEnterpriseManaged()) {
1895 return false; 1894 return false;
1896 } 1895 }
1897 1896
1898 // Do not show end of life notification if this is a guest session 1897 // Do not show end of life notification if this is a guest session
1899 return !profile->IsGuestSession(); 1898 return !profile->IsGuestSession();
1900 } 1899 }
1901 1900
1902 } // namespace chromeos 1901 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screens/network_screen.cc ('k') | chrome/browser/chromeos/login/signin/oauth2_login_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698