Index: components/proximity_auth/screenlock_bridge.cc |
diff --git a/components/proximity_auth/screenlock_bridge.cc b/components/proximity_auth/screenlock_bridge.cc |
index 2af83781dc0dfe986a4ffb3114cf1781361ab2ce..9d70799735e94df0a185bd06a942adea49e98921 100644 |
--- a/components/proximity_auth/screenlock_bridge.cc |
+++ b/components/proximity_auth/screenlock_bridge.cc |
@@ -49,9 +49,7 @@ std::string GetIdForIcon(ScreenlockBridge::UserPodCustomIcon icon) { |
} // namespace |
-ScreenlockBridge::ScreenlockBridge(ProximityAuthClient* client) |
- : client_(client), lock_handler_(nullptr) { |
- DCHECK(client_); |
+ScreenlockBridge::ScreenlockBridge() : lock_handler_(nullptr) { |
} |
ScreenlockBridge::~ScreenlockBridge() { |
@@ -150,19 +148,19 @@ bool ScreenlockBridge::IsLocked() const { |
return lock_handler_ != nullptr; |
} |
-void ScreenlockBridge::Lock(content::BrowserContext* browser_context) { |
+void ScreenlockBridge::Lock(ProximityAuthClient* client) { |
Tim Song
2015/06/26 23:46:43
Hmm... requiring the client here couples the Scree
Ilya Sherman
2015/06/27 08:18:00
I removed the Lock() implementation for now, since
|
#if defined(OS_CHROMEOS) |
chromeos::SessionManagerClient* session_manager = |
chromeos::DBusThreadManager::Get()->GetSessionManagerClient(); |
session_manager->RequestLockScreen(); |
#else |
- client_->Lock(browser_context); |
+ client->Lock(); |
#endif |
} |
-void ScreenlockBridge::Unlock(content::BrowserContext* browser_context) { |
+void ScreenlockBridge::Unlock(ProximityAuthClient* client) { |
Tim Song
2015/06/26 23:46:43
I think it would be better to take the username di
Ilya Sherman
2015/06/27 08:18:00
Done.
|
if (lock_handler_) |
- lock_handler_->Unlock(client_->GetAuthenticatedUsername(browser_context)); |
+ lock_handler_->Unlock(client->GetAuthenticatedUsername()); |
} |
void ScreenlockBridge::AddObserver(Observer* observer) { |