Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / components / policy / core / browser / cloud / message_util.h
blob73860776a4bc19fa4c61812b9bb5d4b8e37f9231
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.
5 #ifndef COMPONENTS_POLICY_CORE_BROWSER_CLOUD_MESSAGE_UTIL_H_
6 #define COMPONENTS_POLICY_CORE_BROWSER_CLOUD_MESSAGE_UTIL_H_
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"
14 namespace policy {
16 // Returns a string describing |status| suitable for display in UI.
17 POLICY_EXPORT base::string16 FormatDeviceManagementStatus(
18 DeviceManagementStatus status);
20 // Returns a string describing |validation_status| suitable for display in UI.
21 POLICY_EXPORT base::string16 FormatValidationStatus(
22 CloudPolicyValidatorBase::Status validation_status);
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 base::string16 FormatStoreStatus(
28 CloudPolicyStore::Status store_status,
29 CloudPolicyValidatorBase::Status validation_status);
31 } // namespace policy
33 #endif // COMPONENTS_POLICY_CORE_BROWSER_CLOUD_MESSAGE_UTIL_H_