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

Unified Diff: chrome/browser/chromeos/login/screens/user_selection_screen.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/chromeos/login/screens/user_selection_screen.cc
diff --git a/chrome/browser/chromeos/login/screens/user_selection_screen.cc b/chrome/browser/chromeos/login/screens/user_selection_screen.cc
index 2156e875ba8628f148baace53f9a2db02cb3f8a4..47af52839b06c95201b3d2fd4540ca2a4177749a 100644
--- a/chrome/browser/chromeos/login/screens/user_selection_screen.cc
+++ b/chrome/browser/chromeos/login/screens/user_selection_screen.cc
@@ -17,10 +17,14 @@
#include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h"
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_window.h"
#include "chrome/browser/signin/easy_unlock_service.h"
-#include "chrome/browser/signin/screenlock_bridge.h"
+#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/ui/webui/chromeos/login/l10n_util.h"
#include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
+#include "components/signin/content/screenlock_bridge.h"
+#include "components/signin/core/browser/signin_manager_base.h"
#include "components/user_manager/user_id.h"
#include "components/user_manager/user_manager.h"
#include "components/user_manager/user_type.h"
@@ -488,6 +492,17 @@ void UserSelectionScreen::EnableInput() {
ScreenLocker::default_screen_locker()->EnableInput();
}
+void UserSelectionScreen::Lock(content::BrowserContext* browser_context) {
+ profiles::LockProfile(Profile::FromBrowserContext(browser_context));
+}
+
+void UserSelectionScreen::Unlock(content::BrowserContext* browser_context) {
+ Profile* profile = Profile::FromBrowserContext(browser_context);
+ SigninManagerBase* signin_manager =
+ SigninManagerFactory::GetForProfile(profile);
Ilya Sherman 2015/04/21 23:02:39 This is not exactly equivalent to the previous imp
msarda 2015/04/22 16:42:42 Done.
+ Unlock(signin_manager->GetAuthenticatedUsername());
+}
Ilya Sherman 2015/04/21 23:02:39 Rather than duplicating the implementations of the
msarda 2015/04/22 16:42:42 I considered using a client interface, however IMH
Ilya Sherman 2015/04/23 07:09:48 The component setup code could call a method to se
+
void UserSelectionScreen::Unlock(const std::string& user_email) {
DCHECK_EQ(GetScreenType(), LOCK_SCREEN);
ScreenLocker::Hide();

Powered by Google App Engine
This is Rietveld 408576698