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

Unified Diff: chrome/browser/ui/webui/signin/user_manager_screen_handler.cc

Issue 1096293003: Move screenlock_bridge to components/proximity_auth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix linux build Created 5 years, 8 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
Index: chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
diff --git a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
index feddfc81a34970e70dc555e1958a80cb6c6bc460..f5be723dd4be79ee0443153dbd4472f787590a4e 100644
--- a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
+++ b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
@@ -35,6 +35,7 @@
#include "chrome/common/url_constants.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
+#include "components/signin/core/browser/signin_manager_base.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
@@ -359,6 +360,18 @@ UserManagerScreenHandler::GetScreenType() const {
return ScreenlockBridge::LockHandler::LOCK_SCREEN;
}
+void UserManagerScreenHandler::Lock(content::BrowserContext* browser_context) {
+ profiles::LockProfile(Profile::FromBrowserContext(browser_context));
+}
+
+void UserManagerScreenHandler::Unlock(
+ content::BrowserContext* browser_context) {
+ Profile* profile = Profile::FromBrowserContext(browser_context);
+ SigninManagerBase* signin_manager =
+ SigninManagerFactory::GetForProfile(profile);
+ Unlock(signin_manager->GetAuthenticatedUsername());
+}
+
void UserManagerScreenHandler::Unlock(const std::string& user_email) {
const ProfileInfoCache& info_cache =
g_browser_process->profile_manager()->GetProfileInfoCache();

Powered by Google App Engine
This is Rietveld 408576698