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

Side by Side Diff: components/policy/core/browser/cloud/message_util.cc

Issue 2655873002: Get enrollment token from DMServer when an Active Directory user uses ARC (Closed)
Patch Set: Change error message string Created 3 years, 10 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 #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/components_strings.h" 8 #include "grit/components_strings.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 10
(...skipping 30 matching lines...) Expand all
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: 45 case DM_STATUS_SERVICE_DOMAIN_MISMATCH:
46 return IDS_POLICY_DM_STATUS_SERVICE_DOMAIN_MISMATCH; 46 return IDS_POLICY_DM_STATUS_SERVICE_DOMAIN_MISMATCH;
47 case DM_STATUS_SERVICE_POLICY_NOT_FOUND: 47 case DM_STATUS_SERVICE_POLICY_NOT_FOUND:
48 return IDS_POLICY_DM_STATUS_SERVICE_POLICY_NOT_FOUND; 48 return IDS_POLICY_DM_STATUS_SERVICE_POLICY_NOT_FOUND;
49 case DM_STATUS_CANNOT_SIGN_REQUEST: 49 case DM_STATUS_CANNOT_SIGN_REQUEST:
50 return IDS_POLICY_DM_STATUS_CANNOT_SIGN_REQUEST; 50 return IDS_POLICY_DM_STATUS_CANNOT_SIGN_REQUEST;
51 case DM_STATUS_SERVICE_ARC_DISABLED:
52 return IDS_POLICY_DM_STATUS_SERVICE_ARC_DISABLED;
Thiemo Nagel 2017/02/02 13:24:59 I think it's fair to return UNKNOWN_ERROR here sin
Marton Hunyady 2017/02/02 18:19:06 Done.
51 } 53 }
52 NOTREACHED() << "Unhandled DM status " << status; 54 NOTREACHED() << "Unhandled DM status " << status;
53 return IDS_POLICY_DM_STATUS_UNKNOWN_ERROR; 55 return IDS_POLICY_DM_STATUS_UNKNOWN_ERROR;
54 } 56 }
55 57
56 int GetIDSForValidationStatus(CloudPolicyValidatorBase::Status status) { 58 int GetIDSForValidationStatus(CloudPolicyValidatorBase::Status status) {
57 switch (status) { 59 switch (status) {
58 case CloudPolicyValidatorBase::VALIDATION_OK: 60 case CloudPolicyValidatorBase::VALIDATION_OK:
59 return IDS_POLICY_VALIDATION_OK; 61 return IDS_POLICY_VALIDATION_OK;
60 case CloudPolicyValidatorBase::VALIDATION_BAD_INITIAL_SIGNATURE: 62 case CloudPolicyValidatorBase::VALIDATION_BAD_INITIAL_SIGNATURE:
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 return l10n_util::GetStringFUTF16( 131 return l10n_util::GetStringFUTF16(
130 IDS_POLICY_STORE_STATUS_VALIDATION_ERROR, 132 IDS_POLICY_STORE_STATUS_VALIDATION_ERROR,
131 l10n_util::GetStringUTF16( 133 l10n_util::GetStringUTF16(
132 GetIDSForValidationStatus(validation_status))); 134 GetIDSForValidationStatus(validation_status)));
133 } 135 }
134 136
135 return l10n_util::GetStringUTF16(GetIDSForStoreStatus(store_status)); 137 return l10n_util::GetStringUTF16(GetIDSForStoreStatus(store_status));
136 } 138 }
137 139
138 } // namespace policy 140 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698