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

Unified Diff: chrome/browser/chromeos/login/enrollment/enrollment_screen.h

Issue 2186623002: Minimal attestation-based enrollment flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made ZTE independent of enterprise enrollment. Created 4 years, 4 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/enrollment/enrollment_screen.h
diff --git a/chrome/browser/chromeos/login/enrollment/enrollment_screen.h b/chrome/browser/chromeos/login/enrollment/enrollment_screen.h
index 4753d7db28f2c0cec80c7b72d710cd40f42af2bd..fd03d54ae4f9c56b9a41df3c3976e7fcdb019273 100644
--- a/chrome/browser/chromeos/login/enrollment/enrollment_screen.h
+++ b/chrome/browser/chromeos/login/enrollment/enrollment_screen.h
@@ -83,6 +83,8 @@ class EnrollmentScreen
private:
FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenTest, TestSuccess);
+ FRIEND_TEST_ALL_PREFIXES(MultiAuthEnrollmentScreenTest, TestCancel);
+ FRIEND_TEST_ALL_PREFIXES(AttestationAuthEnrollmentScreenTest, TestCancel);
FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest,
TestProperPageGetsLoadedOnEnrollmentSuccess);
FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest,
@@ -90,7 +92,16 @@ class EnrollmentScreen
FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest,
TestAuthCodeGetsProperlyReceivedFromGaia);
- // Creates an enrollment helper.
+ // The authentication mechanisms that this class can use.
+ enum Auth {
+ AUTH_ATTESTATION,
+ AUTH_OAUTH,
+ };
+
+ // Sets the current config to use for enrollment.
+ void SetConfig();
+
+ // Creates an enrollment helper if needed.
void CreateEnrollmentHelper();
// Clears auth in |enrollment_helper_|. Deletes |enrollment_helper_| and runs
@@ -112,6 +123,12 @@ class EnrollmentScreen
// |enrollment_mode_|.
void UMA(policy::MetricEnrollment sample);
+ // Do attestation based enrollment.
+ void AuthenticateUsingAttestation();
+
+ // Shows the interactive screen. Resets auth then shows the signin screen.
+ void ShowInteractiveScreen();
+
// Shows the signin screen. Used as a callback to run after auth reset.
void ShowSigninScreen();
@@ -119,12 +136,19 @@ class EnrollmentScreen
// Used as a callback to run after successful enrollment.
void ShowAttributePromptScreen();
+ // Handle enrollment errors.
void OnAnyEnrollmentError();
+ // Advance to the next authentication mechanism if possible.
+ bool AdvanceToNextAuth();
+
pairing_chromeos::ControllerPairingController* shark_controller_;
EnrollmentScreenActor* actor_;
+ policy::EnrollmentConfig config_;
policy::EnrollmentConfig enrollment_config_;
+ Auth current_auth_;
+ Auth last_auth_;
bool enrollment_failed_once_;
std::string enrolling_user_domain_;
std::unique_ptr<base::ElapsedTimer> elapsed_timer_;

Powered by Google App Engine
This is Rietveld 408576698