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 #include "components/policy/core/browser/cloud/message_util.h" | 5 #include "components/policy/core/browser/cloud/message_util.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "grit/component_strings.h" | 8 #include "grit/component_strings.h" |
9 #include "ui/base/l10n/l10n_util.h" | 9 #include "ui/base/l10n/l10n_util.h" |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 case DM_STATUS_SERVICE_ACTIVATION_PENDING: | 35 case DM_STATUS_SERVICE_ACTIVATION_PENDING: |
36 return IDS_POLICY_DM_STATUS_SERVICE_ACTIVATION_PENDING; | 36 return IDS_POLICY_DM_STATUS_SERVICE_ACTIVATION_PENDING; |
37 case DM_STATUS_SERVICE_INVALID_SERIAL_NUMBER: | 37 case DM_STATUS_SERVICE_INVALID_SERIAL_NUMBER: |
38 return IDS_POLICY_DM_STATUS_SERVICE_INVALID_SERIAL_NUMBER; | 38 return IDS_POLICY_DM_STATUS_SERVICE_INVALID_SERIAL_NUMBER; |
39 case DM_STATUS_SERVICE_DEVICE_ID_CONFLICT: | 39 case DM_STATUS_SERVICE_DEVICE_ID_CONFLICT: |
40 return IDS_POLICY_DM_STATUS_SERVICE_DEVICE_ID_CONFLICT; | 40 return IDS_POLICY_DM_STATUS_SERVICE_DEVICE_ID_CONFLICT; |
41 case DM_STATUS_SERVICE_MISSING_LICENSES: | 41 case DM_STATUS_SERVICE_MISSING_LICENSES: |
42 return IDS_POLICY_DM_STATUS_SERVICE_MISSING_LICENSES; | 42 return IDS_POLICY_DM_STATUS_SERVICE_MISSING_LICENSES; |
43 case DM_STATUS_SERVICE_DEPROVISIONED: | 43 case DM_STATUS_SERVICE_DEPROVISIONED: |
44 return IDS_POLICY_DM_STATUS_SERVICE_DEPROVISIONED; | 44 return IDS_POLICY_DM_STATUS_SERVICE_DEPROVISIONED; |
| 45 case DM_STATUS_SERVICE_DOMAIN_MISMATCH: |
| 46 return IDS_POLICY_DM_STATUS_SERVICE_DOMAIN_MISMATCH; |
45 case DM_STATUS_SERVICE_POLICY_NOT_FOUND: | 47 case DM_STATUS_SERVICE_POLICY_NOT_FOUND: |
46 return IDS_POLICY_DM_STATUS_SERVICE_POLICY_NOT_FOUND; | 48 return IDS_POLICY_DM_STATUS_SERVICE_POLICY_NOT_FOUND; |
47 } | 49 } |
48 NOTREACHED() << "Unhandled DM status " << status; | 50 NOTREACHED() << "Unhandled DM status " << status; |
49 return IDS_POLICY_DM_STATUS_UNKNOWN_ERROR; | 51 return IDS_POLICY_DM_STATUS_UNKNOWN_ERROR; |
50 } | 52 } |
51 | 53 |
52 int GetIDSForValidationStatus(CloudPolicyValidatorBase::Status status) { | 54 int GetIDSForValidationStatus(CloudPolicyValidatorBase::Status status) { |
53 switch (status) { | 55 switch (status) { |
54 case CloudPolicyValidatorBase::VALIDATION_OK: | 56 case CloudPolicyValidatorBase::VALIDATION_OK: |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 return l10n_util::GetStringFUTF16( | 125 return l10n_util::GetStringFUTF16( |
124 IDS_POLICY_STORE_STATUS_VALIDATION_ERROR, | 126 IDS_POLICY_STORE_STATUS_VALIDATION_ERROR, |
125 l10n_util::GetStringUTF16( | 127 l10n_util::GetStringUTF16( |
126 GetIDSForValidationStatus(validation_status))); | 128 GetIDSForValidationStatus(validation_status))); |
127 } | 129 } |
128 | 130 |
129 return l10n_util::GetStringUTF16(GetIDSForStoreStatus(store_status)); | 131 return l10n_util::GetStringUTF16(GetIDSForStoreStatus(store_status)); |
130 } | 132 } |
131 | 133 |
132 } // namespace policy | 134 } // namespace policy |
OLD | NEW |