OLD | NEW |
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_ENROLLMENT_STATUS_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_STATUS_CHROMEOS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_STATUS_CHROMEOS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_STATUS_CHROMEOS_H_ |
7 | 7 |
8 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h" | 8 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h" |
9 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 9 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
10 #include "components/policy/core/common/cloud/cloud_policy_store.h" | 10 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 STATUS_POLICY_FETCH_FAILED = 7, // DM policy fetch failed. | 32 STATUS_POLICY_FETCH_FAILED = 7, // DM policy fetch failed. |
33 STATUS_VALIDATION_FAILED = 8, // Policy validation failed. | 33 STATUS_VALIDATION_FAILED = 8, // Policy validation failed. |
34 STATUS_LOCK_ERROR = 9, // Cryptohome failed to lock device. | 34 STATUS_LOCK_ERROR = 9, // Cryptohome failed to lock device. |
35 /* STATUS_LOCK_TIMEOUT = 10, */ // Unused: Timeout while waiting for | 35 /* STATUS_LOCK_TIMEOUT = 10, */ // Unused: Timeout while waiting for |
36 // the lock. | 36 // the lock. |
37 /* STATUS_LOCK_WRONG_USER = 11, */ // Unused: Locked to different | 37 /* STATUS_LOCK_WRONG_USER = 11, */ // Unused: Locked to different |
38 // domain. | 38 // domain. |
39 STATUS_STORE_ERROR = 12, // Failed to store the policy. | 39 STATUS_STORE_ERROR = 12, // Failed to store the policy. |
40 STATUS_STORE_TOKEN_AND_ID_FAILED = 13, // Failed to store DM token and | 40 STATUS_STORE_TOKEN_AND_ID_FAILED = 13, // Failed to store DM token and |
41 // device ID. | 41 // device ID. |
| 42 STATUS_ATTRIBUTE_UPDATE_FAILED = 14, // Device attribute update failed. |
42 }; | 43 }; |
43 | 44 |
44 // Helpers for constructing errors for relevant cases. | 45 // Helpers for constructing errors for relevant cases. |
45 static EnrollmentStatus ForStatus(Status status); | 46 static EnrollmentStatus ForStatus(Status status); |
46 static EnrollmentStatus ForRegistrationError( | 47 static EnrollmentStatus ForRegistrationError( |
47 DeviceManagementStatus client_status); | 48 DeviceManagementStatus client_status); |
48 static EnrollmentStatus ForFetchError(DeviceManagementStatus client_status); | 49 static EnrollmentStatus ForFetchError(DeviceManagementStatus client_status); |
49 static EnrollmentStatus ForRobotAuthFetchError( | 50 static EnrollmentStatus ForRobotAuthFetchError( |
50 DeviceManagementStatus client_status); | 51 DeviceManagementStatus client_status); |
51 static EnrollmentStatus ForRobotRefreshFetchError(int http_status); | 52 static EnrollmentStatus ForRobotRefreshFetchError(int http_status); |
(...skipping 28 matching lines...) Expand all Loading... |
80 DeviceManagementStatus client_status_; | 81 DeviceManagementStatus client_status_; |
81 int http_status_; | 82 int http_status_; |
82 CloudPolicyStore::Status store_status_; | 83 CloudPolicyStore::Status store_status_; |
83 CloudPolicyValidatorBase::Status validation_status_; | 84 CloudPolicyValidatorBase::Status validation_status_; |
84 EnterpriseInstallAttributes::LockResult lock_status_; | 85 EnterpriseInstallAttributes::LockResult lock_status_; |
85 }; | 86 }; |
86 | 87 |
87 } // namespace policy | 88 } // namespace policy |
88 | 89 |
89 #endif // CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_STATUS_CHROMEOS_H_ | 90 #endif // CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_STATUS_CHROMEOS_H_ |
OLD | NEW |