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

Unified Diff: components/proximity_auth/screenlock_bridge.cc

Issue 1209193003: [Proximity Auth] Create one ProximityAuthClient per profile, rather than one global one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable tests on non-ChromeOS, since there's nothing left to test on the other platforms Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/proximity_auth/screenlock_bridge.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c3dd25f50e6ab69f16189da4c1fbf2d9448a8bd6 100644
--- a/components/proximity_auth/screenlock_bridge.cc
+++ b/components/proximity_auth/screenlock_bridge.cc
@@ -6,7 +6,6 @@
#include "base/logging.h"
#include "base/strings/string16.h"
-#include "components/proximity_auth/proximity_auth_client.h"
#if defined(OS_CHROMEOS)
#include "chromeos/dbus/dbus_thread_manager.h"
@@ -49,9 +48,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 +147,19 @@ bool ScreenlockBridge::IsLocked() const {
return lock_handler_ != nullptr;
}
-void ScreenlockBridge::Lock(content::BrowserContext* browser_context) {
+void ScreenlockBridge::Lock() {
#if defined(OS_CHROMEOS)
chromeos::SessionManagerClient* session_manager =
chromeos::DBusThreadManager::Get()->GetSessionManagerClient();
session_manager->RequestLockScreen();
#else
- client_->Lock(browser_context);
+ NOTIMPLEMENTED();
#endif
}
-void ScreenlockBridge::Unlock(content::BrowserContext* browser_context) {
+void ScreenlockBridge::Unlock(const std::string& user_email) {
if (lock_handler_)
- lock_handler_->Unlock(client_->GetAuthenticatedUsername(browser_context));
+ lock_handler_->Unlock(user_email);
}
void ScreenlockBridge::AddObserver(Observer* observer) {
« no previous file with comments | « components/proximity_auth/screenlock_bridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698