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 3 // found in the LICENSE file. 4 5 #ifndef COMPONENTS_POLICY_CORE_BROWSER_CLOUD_MESSAGE_UTIL_H_ 6 #define COMPONENTS_POLICY_CORE_BROWSER_CLOUD_MESSAGE_UTIL_H_ 7 8 #include "base/strings/string16.h" 9 #include "components/policy/core/common/cloud/cloud_policy_constants.h" 10 #include "components/policy/core/common/cloud/cloud_policy_store.h" 11 #include "components/policy/core/common/cloud/cloud_policy_validator.h" 12 #include "components/policy/policy_export.h" 13 14 namespace policy { 15 16 // Returns a string describing |status| suitable for display in UI. 17 POLICY_EXPORT string16 FormatDeviceManagementStatus( 18 DeviceManagementStatus status); 19 20 // Returns a string describing |validation_status| suitable for display in UI. 21 POLICY_EXPORT string16 FormatValidationStatus( 22 CloudPolicyValidatorBase::Status validation_status); 23 24 // Returns a textual description of |store_status| for display in the UI. If 25 // |store_status| is STATUS_VALIDATION_FAILED, |validation_status| will be 26 // consulted to create a description of the validation failure. 27 POLICY_EXPORT string16 FormatStoreStatus( 28 CloudPolicyStore::Status store_status, 29 CloudPolicyValidatorBase::Status validation_status); 30 31 } // namespace policy 32 33 #endif // COMPONENTS_POLICY_CORE_BROWSER_CLOUD_MESSAGE_UTIL_H_ 34