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

Side by Side Diff: chrome/browser/chromeos/login/enrollment/enrollment_screen.h

Issue 2977033002: Mixed Licenses Enrollment (Closed)
Patch Set: Fix last nit Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/enrollment/enrollment_screen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_ENROLLMENT_ENROLLMENT_SCREEN_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 void OnLicenseTypeSelected(const std::string& license_type) override; 67 void OnLicenseTypeSelected(const std::string& license_type) override;
68 void OnRetry() override; 68 void OnRetry() override;
69 void OnCancel() override; 69 void OnCancel() override;
70 void OnConfirmationClosed() override; 70 void OnConfirmationClosed() override;
71 void OnAdJoined(const std::string& realm) override; 71 void OnAdJoined(const std::string& realm) override;
72 void OnDeviceAttributeProvided(const std::string& asset_id, 72 void OnDeviceAttributeProvided(const std::string& asset_id,
73 const std::string& location) override; 73 const std::string& location) override;
74 74
75 // EnterpriseEnrollmentHelper::EnrollmentStatusConsumer implementation: 75 // EnterpriseEnrollmentHelper::EnrollmentStatusConsumer implementation:
76 void OnAuthError(const GoogleServiceAuthError& error) override; 76 void OnAuthError(const GoogleServiceAuthError& error) override;
77 void OnMultipleLicensesAvailable(
78 const EnrollmentLicenseMap& licenses) override;
77 void OnEnrollmentError(policy::EnrollmentStatus status) override; 79 void OnEnrollmentError(policy::EnrollmentStatus status) override;
78 void OnOtherError(EnterpriseEnrollmentHelper::OtherError error) override; 80 void OnOtherError(EnterpriseEnrollmentHelper::OtherError error) override;
79 void OnDeviceEnrolled(const std::string& additional_token) override; 81 void OnDeviceEnrolled(const std::string& additional_token) override;
80 void OnDeviceAttributeUploadCompleted(bool success) override; 82 void OnDeviceAttributeUploadCompleted(bool success) override;
81 void OnDeviceAttributeUpdatePermission(bool granted) override; 83 void OnDeviceAttributeUpdatePermission(bool granted) override;
82 84
83 // ActiveDirectoryJoinDelegate implementation: 85 // ActiveDirectoryJoinDelegate implementation:
84 void JoinDomain(OnDomainJoinedCallback on_joined_callback) override; 86 void JoinDomain(OnDomainJoinedCallback on_joined_callback) override;
85 87
86 // Used for testing. 88 // Used for testing.
87 EnrollmentScreenView* GetView() { return view_; } 89 EnrollmentScreenView* GetView() { return view_; }
88 90
89 private: 91 private:
90 friend class EnrollmentScreenUnitTest; 92 friend class MultiLicenseEnrollmentScreenUnitTest;
91 FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenTest, TestSuccess); 93 friend class ZeroTouchEnrollmentScreenUnitTest;
92 FRIEND_TEST_ALL_PREFIXES(AttestationAuthEnrollmentScreenTest, TestCancel); 94 FRIEND_TEST_ALL_PREFIXES(AttestationAuthEnrollmentScreenTest, TestCancel);
93 FRIEND_TEST_ALL_PREFIXES(ForcedAttestationAuthEnrollmentScreenTest, 95 FRIEND_TEST_ALL_PREFIXES(ForcedAttestationAuthEnrollmentScreenTest,
94 TestCancel); 96 TestCancel);
95 FRIEND_TEST_ALL_PREFIXES(MultiAuthEnrollmentScreenTest, TestCancel); 97 FRIEND_TEST_ALL_PREFIXES(MultiAuthEnrollmentScreenTest, TestCancel);
96 FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest, 98 FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest,
97 TestProperPageGetsLoadedOnEnrollmentSuccess); 99 TestProperPageGetsLoadedOnEnrollmentSuccess);
98 FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest, 100 FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest,
99 TestAttributePromptPageGetsLoaded); 101 TestAttributePromptPageGetsLoaded);
100 FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest, 102 FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest,
101 TestAuthCodeGetsProperlyReceivedFromGaia); 103 TestAuthCodeGetsProperlyReceivedFromGaia);
102 FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest, 104 FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest,
103 TestActiveDirectoryEnrollment_Success); 105 TestActiveDirectoryEnrollment_Success);
104 FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest, 106 FRIEND_TEST_ALL_PREFIXES(EnterpriseEnrollmentTest,
105 TestActiveDirectoryEnrollment_UIErrors); 107 TestActiveDirectoryEnrollment_UIErrors);
106 FRIEND_TEST_ALL_PREFIXES(HandsOffNetworkScreenTest, RequiresNoInput); 108 FRIEND_TEST_ALL_PREFIXES(HandsOffNetworkScreenTest, RequiresNoInput);
107 FRIEND_TEST_ALL_PREFIXES(HandsOffNetworkScreenTest, ContinueClickedOnlyOnce); 109 FRIEND_TEST_ALL_PREFIXES(HandsOffNetworkScreenTest, ContinueClickedOnlyOnce);
108 FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenUnitTest, Retries); 110 FRIEND_TEST_ALL_PREFIXES(ZeroTouchEnrollmentScreenUnitTest, Retries);
109 FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenUnitTest, DoesNotRetryOnTopOfUser); 111 FRIEND_TEST_ALL_PREFIXES(ZeroTouchEnrollmentScreenUnitTest, TestSuccess);
110 FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenUnitTest, DoesNotRetryAfterSuccess); 112 FRIEND_TEST_ALL_PREFIXES(ZeroTouchEnrollmentScreenUnitTest,
113 DoesNotRetryOnTopOfUser);
114 FRIEND_TEST_ALL_PREFIXES(ZeroTouchEnrollmentScreenUnitTest,
115 DoesNotRetryAfterSuccess);
111 116
112 // The authentication mechanisms that this class can use. 117 // The authentication mechanisms that this class can use.
113 enum Auth { 118 enum Auth {
114 AUTH_ATTESTATION, 119 AUTH_ATTESTATION,
115 AUTH_OAUTH, 120 AUTH_OAUTH,
116 }; 121 };
117 122
118 // Sets the current config to use for enrollment. 123 // Sets the current config to use for enrollment.
119 void SetConfig(); 124 void SetConfig();
120 125
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 std::unique_ptr<EnterpriseEnrollmentHelper> enrollment_helper_; 189 std::unique_ptr<EnterpriseEnrollmentHelper> enrollment_helper_;
185 OnDomainJoinedCallback on_joined_callback_; 190 OnDomainJoinedCallback on_joined_callback_;
186 base::WeakPtrFactory<EnrollmentScreen> weak_ptr_factory_; 191 base::WeakPtrFactory<EnrollmentScreen> weak_ptr_factory_;
187 192
188 DISALLOW_COPY_AND_ASSIGN(EnrollmentScreen); 193 DISALLOW_COPY_AND_ASSIGN(EnrollmentScreen);
189 }; 194 };
190 195
191 } // namespace chromeos 196 } // namespace chromeos
192 197
193 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_H_ 198 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENROLLMENT_SCREEN_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/enrollment/enrollment_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698