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

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: Addressed achuithb's feedback. 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
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | chrome/browser/chromeos/login/enrollment/enrollment_screen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a1931938f13910c51059b79e1d82e69432e0c604 100644
--- a/chrome/browser/chromeos/login/enrollment/enrollment_screen.h
+++ b/chrome/browser/chromeos/login/enrollment/enrollment_screen.h
@@ -83,6 +83,10 @@ class EnrollmentScreen
private:
FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenTest, TestSuccess);
+ FRIEND_TEST_ALL_PREFIXES(AttestationAuthEnrollmentScreenTest, TestCancel);
+ FRIEND_TEST_ALL_PREFIXES(ForcedAttestationAuthEnrollmentScreenTest,
+ TestCancel);
+ FRIEND_TEST_ALL_PREFIXES(MultiAuthEnrollmentScreenTest, TestCancel);
FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest,
TestProperPageGetsLoadedOnEnrollmentSuccess);
FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest,
@@ -90,7 +94,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 +125,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,13 +138,20 @@ class EnrollmentScreen
// Used as a callback to run after successful enrollment.
void ShowAttributePromptScreen();
+ // Handle enrollment errors.
void OnAnyEnrollmentError();
- pairing_chromeos::ControllerPairingController* shark_controller_;
+ // Advance to the next authentication mechanism if possible.
+ bool AdvanceToNextAuth();
+
+ pairing_chromeos::ControllerPairingController* shark_controller_ = nullptr;
EnrollmentScreenActor* actor_;
+ policy::EnrollmentConfig config_;
policy::EnrollmentConfig enrollment_config_;
- bool enrollment_failed_once_;
+ Auth current_auth_ = AUTH_OAUTH;
+ Auth last_auth_ = AUTH_OAUTH;
+ bool enrollment_failed_once_ = false;
std::string enrolling_user_domain_;
std::unique_ptr<base::ElapsedTimer> elapsed_timer_;
std::unique_ptr<EnterpriseEnrollmentHelper> enrollment_helper_;
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | chrome/browser/chromeos/login/enrollment/enrollment_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698