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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller.h

Issue 696263003: Prevent login while cros settings are untrusted (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@f_2_425574_add_protos_for_device_disabling_in_steady_state
Patch Set: Fix multi-login. Fix style guide violation: no else after return. Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 virtual void OnSigninScreenReady() override; 91 virtual void OnSigninScreenReady() override;
92 virtual void OnStartEnterpriseEnrollment() override; 92 virtual void OnStartEnterpriseEnrollment() override;
93 virtual void OnStartKioskEnableScreen() override; 93 virtual void OnStartKioskEnableScreen() override;
94 virtual void OnStartKioskAutolaunchScreen() override; 94 virtual void OnStartKioskAutolaunchScreen() override;
95 virtual void ResetPublicSessionAutoLoginTimer() override; 95 virtual void ResetPublicSessionAutoLoginTimer() override;
96 virtual void ResyncUserData() override; 96 virtual void ResyncUserData() override;
97 virtual void SetDisplayEmail(const std::string& email) override; 97 virtual void SetDisplayEmail(const std::string& email) override;
98 virtual void ShowWrongHWIDScreen() override; 98 virtual void ShowWrongHWIDScreen() override;
99 virtual void Signout() override; 99 virtual void Signout() override;
100 100
101 void LoginAsRetailModeUser();
102 void LoginAsGuest();
103 void LoginAsPublicSession(const UserContext& user_context);
104 void LoginAsKioskApp(const std::string& app_id, bool diagnostic_mode);
105
106 // content::NotificationObserver implementation. 101 // content::NotificationObserver implementation.
107 virtual void Observe(int type, 102 virtual void Observe(int type,
108 const content::NotificationSource& source, 103 const content::NotificationSource& source,
109 const content::NotificationDetails& details) override; 104 const content::NotificationDetails& details) override;
110 105
111 // Set a delegate that we will pass AuthStatusConsumer events to. 106 // Set a delegate that we will pass AuthStatusConsumer events to.
112 // Used for testing. 107 // Used for testing.
113 void set_login_status_consumer(AuthStatusConsumer* consumer) { 108 void set_login_status_consumer(AuthStatusConsumer* consumer) {
114 auth_status_consumer_ = consumer; 109 auth_status_consumer_ = consumer;
115 } 110 }
(...skipping 16 matching lines...) Expand all
132 // Returns value of LoginPerformer::password_changed() (cached if performer is 127 // Returns value of LoginPerformer::password_changed() (cached if performer is
133 // destroyed). 128 // destroyed).
134 bool password_changed() const; 129 bool password_changed() const;
135 130
136 private: 131 private:
137 friend class ExistingUserControllerTest; 132 friend class ExistingUserControllerTest;
138 friend class ExistingUserControllerAutoLoginTest; 133 friend class ExistingUserControllerAutoLoginTest;
139 friend class ExistingUserControllerPublicSessionTest; 134 friend class ExistingUserControllerPublicSessionTest;
140 friend class MockLoginPerformerDelegate; 135 friend class MockLoginPerformerDelegate;
141 136
137 void LoginAsRetailModeUser();
138 void LoginAsGuest();
139 void LoginAsPublicSession(const UserContext& user_context);
140 void LoginAsKioskApp(const std::string& app_id, bool diagnostic_mode);
141
142 // Retrieve public session auto-login policy and update the timer. 142 // Retrieve public session auto-login policy and update the timer.
143 void ConfigurePublicSessionAutoLogin(); 143 void ConfigurePublicSessionAutoLogin();
144 144
145 // Trigger public session auto-login. 145 // Trigger public session auto-login.
146 void OnPublicSessionAutoLoginTimerFire(); 146 void OnPublicSessionAutoLoginTimerFire();
147 147
148 // LoginPerformer::Delegate implementation: 148 // LoginPerformer::Delegate implementation:
149 virtual void OnAuthFailure(const AuthFailure& error) override; 149 virtual void OnAuthFailure(const AuthFailure& error) override;
150 virtual void OnAuthSuccess(const UserContext& user_context) override; 150 virtual void OnAuthSuccess(const UserContext& user_context) override;
151 virtual void OnOffTheRecordAuthSuccess() override; 151 virtual void OnOffTheRecordAuthSuccess() override;
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 340
341 // Factory of callbacks. 341 // Factory of callbacks.
342 base::WeakPtrFactory<ExistingUserController> weak_factory_; 342 base::WeakPtrFactory<ExistingUserController> weak_factory_;
343 343
344 DISALLOW_COPY_AND_ASSIGN(ExistingUserController); 344 DISALLOW_COPY_AND_ASSIGN(ExistingUserController);
345 }; 345 };
346 346
347 } // namespace chromeos 347 } // namespace chromeos
348 348
349 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_ 349 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EXISTING_USER_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698