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

Unified Diff: chrome/browser/signin/easy_unlock_auth_attempt_unittest.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/signin/easy_unlock_auth_attempt_unittest.cc
diff --git a/chrome/browser/signin/easy_unlock_auth_attempt_unittest.cc b/chrome/browser/signin/easy_unlock_auth_attempt_unittest.cc
index 0cf2f87818758e217379e131a13536290c87d4da..87f95f2cec03bba05efe0b39e3e69a7ab2ec24cc 100644
--- a/chrome/browser/signin/easy_unlock_auth_attempt_unittest.cc
+++ b/chrome/browser/signin/easy_unlock_auth_attempt_unittest.cc
@@ -5,8 +5,11 @@
#include "chrome/browser/signin/easy_unlock_auth_attempt.h"
#include "base/macros.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/easy_unlock_app_manager.h"
-#include "chrome/browser/signin/screenlock_bridge.h"
+#include "chrome/browser/signin/signin_manager_factory.h"
+#include "components/signin/content/screenlock_bridge.h"
+#include "components/signin/core/browser/signin_manager_base.h"
#include "testing/gtest/include/gtest/gtest.h"
#if defined(OS_CHROMEOS)
@@ -168,6 +171,17 @@ class TestLockHandler : public ScreenlockBridge::LockHandler {
return LOCK_SCREEN;
}
+ void Lock(content::BrowserContext* browser_context) override {
+ // Ignored.
+ }
+
+ void Unlock(content::BrowserContext* browser_context) override {
+ Profile* profile = Profile::FromBrowserContext(browser_context);
+ SigninManagerBase* signin_manager =
+ SigninManagerFactory::GetForProfile(profile);
+ Unlock(signin_manager->GetAuthenticatedUsername());
+ }
+
void Unlock(const std::string& user_email) override {
ASSERT_EQ(user_id_, user_email);
ASSERT_EQ(STATE_ATTEMPTING_UNLOCK, state_);

Powered by Google App Engine
This is Rietveld 408576698