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

Unified Diff: chrome/browser/chromeos/login/easy_unlock/easy_unlock_reauth.h

Issue 668213003: Reauthenticate the user before launching Smart Lock setup app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/easy_unlock/easy_unlock_reauth.h
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_reauth.h b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_reauth.h
new file mode 100644
index 0000000000000000000000000000000000000000..0f56e1cd85e902ea92d181a68d4a4dc603816262
--- /dev/null
+++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_reauth.h
@@ -0,0 +1,39 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_REAUTH_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_REAUTH_H_
+
+#include "base/callback_forward.h"
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+
+namespace chromeos {
+
+class UserContext;
+
+// Responsible for locking the screen and reauthenticating the user so we can
+// create new cryptohome keys for passwordless sign-in.
+class EasyUnlockReauth {
+ public:
+ typedef base::Callback<void(const UserContext&)> UserContextCallback;
+
+ // Launches the reauth screen to get the user context. If the screen fails
+ // for some reason, then this function will return false.
+ static bool ReauthForUserContext(UserContextCallback callback);
+
+ private:
+ // Helper class performing the actual reauth flow.
tbarzic 2014/10/27 21:44:43 as far as I can see, the whole private block can b
Tim Song 2014/10/31 17:57:37 Done.
+ class ReauthHandler;
+
+ static void EndReauthAttempt();
+
+ static ReauthHandler* reauth_handler_;
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(EasyUnlockReauth);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_REAUTH_H_

Powered by Google App Engine
This is Rietveld 408576698