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

Unified Diff: chrome/browser/chromeos/login/lock/screen_locker.h

Issue 2429033003: cros: Cleanup lock screen and OOBE C++ backing code. (Closed)
Patch Set: Initial patch Created 4 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/lock/screen_locker.h
diff --git a/chrome/browser/chromeos/login/lock/screen_locker.h b/chrome/browser/chromeos/login/lock/screen_locker.h
index 89ef5dde31bd5726f0f64f9222b7b3adde193eea..f66bf327ba326cf33a24c2d35d0b95a90a353b87 100644
--- a/chrome/browser/chromeos/login/lock/screen_locker.h
+++ b/chrome/browser/chromeos/login/lock/screen_locker.h
@@ -15,7 +15,6 @@
#include "base/sequenced_task_runner_helpers.h"
#include "base/time/time.h"
#include "chrome/browser/chromeos/login/help_app_launcher.h"
-#include "chrome/browser/chromeos/login/lock/screen_locker_delegate.h"
#include "chrome/browser/chromeos/login/ui/login_display.h"
#include "chromeos/login/auth/auth_status_consumer.h"
#include "chromeos/login/auth/user_context.h"
@@ -37,6 +36,7 @@ class Authenticator;
class ExtendedAuthenticator;
class AuthFailure;
class ScreenlockIconProvider;
+class WebUIScreenLocker;
namespace test {
class ScreenLockerTester;
@@ -44,7 +44,7 @@ class ScreenLockerViewsTester;
class WebUIScreenLockerTester;
} // namespace test
-// ScreenLocker creates a ScreenLockerDelegate which will display the lock UI.
+// ScreenLocker creates a WebUIScreenLocker which will display the lock UI.
// As well, it takes care of authenticating the user and managing a global
// instance of itself which will be deleted when the system is unlocked.
class ScreenLocker : public AuthStatusConsumer {
@@ -92,8 +92,8 @@ class ScreenLocker : public AuthStatusConsumer {
HelpAppLauncher::HelpTopic help_topic_id,
bool sign_out_only);
- // Returns the screen locker's delegate.
- ScreenLockerDelegate* delegate() const { return delegate_.get(); }
+ // Returns the WebUIScreenLocker used to lock the screen.
+ WebUIScreenLocker* web_ui() const { return web_ui_.get(); }
achuithb 2016/10/20 17:38:33 Wonder if we should drop the const here since we e
jdufault 2016/10/20 19:35:19 I've dropped the const and made the preferred usag
// Returns the users to authenticate.
const user_manager::UserList& users() const { return users_; }
@@ -102,10 +102,6 @@ class ScreenLocker : public AuthStatusConsumer {
// the same login events that ScreenLocker does.
void SetLoginStatusConsumer(chromeos::AuthStatusConsumer* consumer);
- // Returns WebUI associated with screen locker implementation or NULL if
- // there isn't one.
- content::WebUI* GetAssociatedWebUI();
-
// Initialize or uninitialize the ScreenLocker class. It listens to
// NOTIFICATION_SESSION_STARTED so that the screen locker accepts lock
// requests only after a user has logged in.
@@ -129,7 +125,7 @@ class ScreenLocker : public AuthStatusConsumer {
friend class test::ScreenLockerTester;
friend class test::ScreenLockerViewsTester;
friend class test::WebUIScreenLockerTester;
- friend class ScreenLockerDelegate;
+ friend class WebUIScreenLocker;
// Track whether the user used pin or password to unlock the lock screen.
// Values corrospond to UMA histograms, do not modify, or add or delete other
@@ -157,8 +153,8 @@ class ScreenLocker : public AuthStatusConsumer {
// Looks up user in unlock user list.
const user_manager::User* FindUnlockUser(const AccountId& account_id);
- // ScreenLockerDelegate instance in use.
- std::unique_ptr<ScreenLockerDelegate> delegate_;
+ // WebUIScreenLocker instance in use.
+ std::unique_ptr<WebUIScreenLocker> web_ui_;
// Users that can unlock the device.
user_manager::UserList users_;

Powered by Google App Engine
This is Rietveld 408576698