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

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

Issue 2261763002: Device enterprise registration with a certificate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initialize pointers to nullptr. Created 4 years, 3 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 28 matching lines...) Expand all
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: 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:
50 return IDS_POLICY_DM_STATUS_CANNOT_SIGN_REQUEST;
49 } 51 }
50 NOTREACHED() << "Unhandled DM status " << status; 52 NOTREACHED() << "Unhandled DM status " << status;
51 return IDS_POLICY_DM_STATUS_UNKNOWN_ERROR; 53 return IDS_POLICY_DM_STATUS_UNKNOWN_ERROR;
52 } 54 }
53 55
54 int GetIDSForValidationStatus(CloudPolicyValidatorBase::Status status) { 56 int GetIDSForValidationStatus(CloudPolicyValidatorBase::Status status) {
55 switch (status) { 57 switch (status) {
56 case CloudPolicyValidatorBase::VALIDATION_OK: 58 case CloudPolicyValidatorBase::VALIDATION_OK:
57 return IDS_POLICY_VALIDATION_OK; 59 return IDS_POLICY_VALIDATION_OK;
58 case CloudPolicyValidatorBase::VALIDATION_BAD_INITIAL_SIGNATURE: 60 case CloudPolicyValidatorBase::VALIDATION_BAD_INITIAL_SIGNATURE:
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 return l10n_util::GetStringFUTF16( 127 return l10n_util::GetStringFUTF16(
126 IDS_POLICY_STORE_STATUS_VALIDATION_ERROR, 128 IDS_POLICY_STORE_STATUS_VALIDATION_ERROR,
127 l10n_util::GetStringUTF16( 129 l10n_util::GetStringUTF16(
128 GetIDSForValidationStatus(validation_status))); 130 GetIDSForValidationStatus(validation_status)));
129 } 131 }
130 132
131 return l10n_util::GetStringUTF16(GetIDSForStoreStatus(store_status)); 133 return l10n_util::GetStringUTF16(GetIDSForStoreStatus(store_status));
132 } 134 }
133 135
134 } // namespace policy 136 } // namespace policy
OLDNEW
« no previous file with comments | « chromeos/attestation/attestation_flow.cc ('k') | components/policy/core/common/cloud/cloud_policy_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698