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

Side by Side Diff: chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper.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, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 static void SetupEnrollmentHelperMock(CreateMockEnrollmentHelper creator); 83 static void SetupEnrollmentHelperMock(CreateMockEnrollmentHelper creator);
84 84
85 virtual ~EnterpriseEnrollmentHelper(); 85 virtual ~EnterpriseEnrollmentHelper();
86 86
87 // Starts enterprise enrollment using |auth_code|. First tries to exchange the 87 // Starts enterprise enrollment using |auth_code|. First tries to exchange the
88 // auth code to authentication token, then tries to enroll the device with the 88 // auth code to authentication token, then tries to enroll the device with the
89 // received token. 89 // received token.
90 // If |fetch_additional_token| is true, the helper fetches an additional token 90 // If |fetch_additional_token| is true, the helper fetches an additional token
91 // and passes it to the |status_consumer| on successful enrollment. 91 // and passes it to the |status_consumer| on successful enrollment.
92 // EnrollUsingAuthCode can be called only once during this object's lifetime, 92 // EnrollUsingAuthCode can be called only once during this object's lifetime,
93 // and only if neither of EnrollUsing* methods was called before. 93 // and only if none of the EnrollUsing* methods was called before.
94 virtual void EnrollUsingAuthCode(const std::string& auth_code, 94 virtual void EnrollUsingAuthCode(const std::string& auth_code,
95 bool fetch_additional_token) = 0; 95 bool fetch_additional_token) = 0;
96 96
97 // Starts enterprise enrollment using |token|. 97 // Starts enterprise enrollment using |token|.
98 // EnrollUsingToken can be called only once during this object's lifetime, and 98 // EnrollUsingToken can be called only once during this object's lifetime, and
99 // only if neither of EnrollUsing* was called before. 99 // only if none of the EnrollUsing* was called before.
100 virtual void EnrollUsingToken(const std::string& token) = 0; 100 virtual void EnrollUsingToken(const std::string& token) = 0;
101 101
102 // Starts enterprise enrollment using PCA attestation.
103 // EnrollUsingAttestation can be called only once during the object's
104 // lifetime, and only if none of the EnrollUsing* was called before.
105 virtual void EnrollUsingAttestation() = 0;
106
102 // Starts device attribute update process. First tries to get 107 // Starts device attribute update process. First tries to get
103 // permission to update device attributes for current user 108 // permission to update device attributes for current user
104 // using stored during enrollment oauth token. 109 // using stored during enrollment oauth token.
105 virtual void GetDeviceAttributeUpdatePermission() = 0; 110 virtual void GetDeviceAttributeUpdatePermission() = 0;
106 111
107 // Uploads device attributes on DM server. |asset_id| - Asset Identifier 112 // Uploads device attributes on DM server. |asset_id| - Asset Identifier
108 // and |location| - Assigned Location, these attributes were typed by 113 // and |location| - Assigned Location, these attributes were typed by
109 // current user on the device attribute prompt screen after successful 114 // current user on the device attribute prompt screen after successful
110 // enrollment. 115 // enrollment.
111 virtual void UpdateDeviceAttributes(const std::string& asset_id, 116 virtual void UpdateDeviceAttributes(const std::string& asset_id,
(...skipping 20 matching lines...) Expand all
132 // If this is not nullptr, then it will be used to create the enrollment 137 // If this is not nullptr, then it will be used to create the enrollment
133 // helper. |create_mock_enrollment_helper_| needs to outlive this class. 138 // helper. |create_mock_enrollment_helper_| needs to outlive this class.
134 static CreateMockEnrollmentHelper create_mock_enrollment_helper_; 139 static CreateMockEnrollmentHelper create_mock_enrollment_helper_;
135 140
136 DISALLOW_COPY_AND_ASSIGN(EnterpriseEnrollmentHelper); 141 DISALLOW_COPY_AND_ASSIGN(EnterpriseEnrollmentHelper);
137 }; 142 };
138 143
139 } // namespace chromeos 144 } // namespace chromeos
140 145
141 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER _H_ 146 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698