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

Side by Side Diff: chrome/browser/chromeos/policy/auto_enrollment_client.h

Issue 2771803003: Don't start FRE from the login screen (Closed)
Patch Set: Improve comments Created 3 years, 8 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 (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_POLICY_AUTO_ENROLLMENT_CLIENT_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_ 6 #define CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 16 matching lines...) Expand all
27 27
28 namespace net { 28 namespace net {
29 class URLRequestContextGetter; 29 class URLRequestContextGetter;
30 } 30 }
31 31
32 namespace policy { 32 namespace policy {
33 33
34 class DeviceManagementRequestJob; 34 class DeviceManagementRequestJob;
35 class DeviceManagementService; 35 class DeviceManagementService;
36 36
37 // Indicates the current state of the auto-enrollment check. 37 // Indicates the current state of the auto-enrollment check. (Numeric values
38 // are just to make reading of log files easier.)
38 enum AutoEnrollmentState { 39 enum AutoEnrollmentState {
39 // Not yet started. 40 // Not yet started.
40 AUTO_ENROLLMENT_STATE_IDLE, 41 AUTO_ENROLLMENT_STATE_IDLE = 0,
41 // Working, another event will be fired eventually. 42 // Working, another event will be fired eventually.
42 AUTO_ENROLLMENT_STATE_PENDING, 43 AUTO_ENROLLMENT_STATE_PENDING = 1,
43 // Failed to connect to DMServer. 44 // Failed to connect to DMServer.
44 AUTO_ENROLLMENT_STATE_CONNECTION_ERROR, 45 AUTO_ENROLLMENT_STATE_CONNECTION_ERROR = 2,
45 // Connection successful, but the server failed to generate a valid reply. 46 // Connection successful, but the server failed to generate a valid reply.
46 AUTO_ENROLLMENT_STATE_SERVER_ERROR, 47 AUTO_ENROLLMENT_STATE_SERVER_ERROR = 3,
47 // Check completed successfully, enrollment should be triggered. 48 // Check completed successfully, enrollment should be triggered.
48 AUTO_ENROLLMENT_STATE_TRIGGER_ENROLLMENT, 49 AUTO_ENROLLMENT_STATE_TRIGGER_ENROLLMENT = 4,
49 // Check completed successfully, enrollment not applicable. 50 // Check completed successfully, enrollment not applicable.
50 AUTO_ENROLLMENT_STATE_NO_ENROLLMENT, 51 AUTO_ENROLLMENT_STATE_NO_ENROLLMENT = 5,
51 }; 52 };
52 53
53 // Interacts with the device management service and determines whether this 54 // Interacts with the device management service and determines whether this
54 // machine should automatically enter the Enterprise Enrollment screen during 55 // machine should automatically enter the Enterprise Enrollment screen during
55 // OOBE. 56 // OOBE.
56 class AutoEnrollmentClient 57 class AutoEnrollmentClient
57 : public net::NetworkChangeNotifier::NetworkChangeObserver { 58 : public net::NetworkChangeNotifier::NetworkChangeObserver {
58 public: 59 public:
59 // The modulus value is sent in an int64_t field in the protobuf, whose 60 // The modulus value is sent in an int64_t field in the protobuf, whose
60 // maximum value is 2^63-1. So 2^64 and 2^63 can't be represented as moduli 61 // maximum value is 2^63-1. So 2^64 and 2^63 can't be represented as moduli
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // owner has relinquished ownership. 211 // owner has relinquished ownership.
211 base::Time time_start_; 212 base::Time time_start_;
212 base::Time time_extra_start_; 213 base::Time time_extra_start_;
213 214
214 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentClient); 215 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentClient);
215 }; 216 };
216 217
217 } // namespace policy 218 } // namespace policy
218 219
219 #endif // CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_ 220 #endif // CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698