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

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

Issue 214963002: Add error message for domain mismatch on re-enrollment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move message declaration in policy_strings.grdp to work around an Android build issue. Created 6 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 | Annotate | Revision Log
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/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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698