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/chromeos/login/lock/screen_locker.h" | 5 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 virtual ~ScreenLockObserver() { | 86 virtual ~ScreenLockObserver() { |
87 if (DBusThreadManager::IsInitialized()) { | 87 if (DBusThreadManager::IsInitialized()) { |
88 DBusThreadManager::Get()->GetSessionManagerClient()->SetStubDelegate( | 88 DBusThreadManager::Get()->GetSessionManagerClient()->SetStubDelegate( |
89 NULL); | 89 NULL); |
90 } | 90 } |
91 } | 91 } |
92 | 92 |
93 bool session_started() const { return session_started_; } | 93 bool session_started() const { return session_started_; } |
94 | 94 |
95 // SessionManagerClient::StubDelegate overrides: | 95 // SessionManagerClient::StubDelegate overrides: |
96 virtual void LockScreenForStub() OVERRIDE { | 96 virtual void LockScreenForStub() override { |
97 ScreenLocker::HandleLockScreenRequest(); | 97 ScreenLocker::HandleLockScreenRequest(); |
98 } | 98 } |
99 | 99 |
100 // NotificationObserver overrides: | 100 // NotificationObserver overrides: |
101 virtual void Observe(int type, | 101 virtual void Observe(int type, |
102 const content::NotificationSource& source, | 102 const content::NotificationSource& source, |
103 const content::NotificationDetails& details) OVERRIDE { | 103 const content::NotificationDetails& details) override { |
104 if (type == chrome::NOTIFICATION_SESSION_STARTED) | 104 if (type == chrome::NOTIFICATION_SESSION_STARTED) |
105 session_started_ = true; | 105 session_started_ = true; |
106 else | 106 else |
107 NOTREACHED() << "Unexpected notification " << type; | 107 NOTREACHED() << "Unexpected notification " << type; |
108 } | 108 } |
109 | 109 |
110 // UserAddingScreen::Observer overrides: | 110 // UserAddingScreen::Observer overrides: |
111 virtual void OnUserAddingFinished() OVERRIDE { | 111 virtual void OnUserAddingFinished() override { |
112 UserAddingScreen::Get()->RemoveObserver(this); | 112 UserAddingScreen::Get()->RemoveObserver(this); |
113 ScreenLocker::HandleLockScreenRequest(); | 113 ScreenLocker::HandleLockScreenRequest(); |
114 } | 114 } |
115 | 115 |
116 private: | 116 private: |
117 bool session_started_; | 117 bool session_started_; |
118 content::NotificationRegistrar registrar_; | 118 content::NotificationRegistrar registrar_; |
119 | 119 |
120 DISALLOW_COPY_AND_ASSIGN(ScreenLockObserver); | 120 DISALLOW_COPY_AND_ASSIGN(ScreenLockObserver); |
121 }; | 121 }; |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 for (user_manager::UserList::const_iterator it = users_.begin(); | 522 for (user_manager::UserList::const_iterator it = users_.begin(); |
523 it != users_.end(); | 523 it != users_.end(); |
524 ++it) { | 524 ++it) { |
525 if ((*it)->email() == username) | 525 if ((*it)->email() == username) |
526 return true; | 526 return true; |
527 } | 527 } |
528 return false; | 528 return false; |
529 } | 529 } |
530 | 530 |
531 } // namespace chromeos | 531 } // namespace chromeos |
OLD | NEW |