Commit 05bd1009 authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Resolve conflict between two policy::kMaxValue

Both
components/policy/core/common/cloud/machine_level_user_cloud_policy_metrics.h
and
components/policy/core/common/cloud/enterprise_metrics.h
define policy::kMaxValue in two different enums. If code includes
both headers, it won't compile and this happens in some jumbo
build configurations.

This patch changes one of the enums to use enum class so that
the symbols are in different namespaces. (One will shadow the
other but as long as they are used correctly it will be fine)

Bug: 905702
Change-Id: Ia4dd0c89dc8ec5c23c516e90eae7f6c3256a232a
Reviewed-on: https://chromium-review.googlesource.com/c/1344129Reviewed-by: default avatarMaksim Ivanov <emaxx@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#609769}
parent 4fe35580
...@@ -10,7 +10,7 @@ namespace policy { ...@@ -10,7 +10,7 @@ namespace policy {
// This enum is used for recording the metrics. It must match the // This enum is used for recording the metrics. It must match the
// MachineLevelUserCloudPolicyEnrollmentResult in enums.xml and should not be // MachineLevelUserCloudPolicyEnrollmentResult in enums.xml and should not be
// reordered. |kMaxValue| must be assigned to the last entry of the enum. // reordered. |kMaxValue| must be assigned to the last entry of the enum.
enum MachineLevelUserCloudPolicyEnrollmentResult { enum class MachineLevelUserCloudPolicyEnrollmentResult {
kSuccess = 0, kSuccess = 0,
kFailedToFetch = 1, kFailedToFetch = 1,
kFailedToStore = 2, kFailedToStore = 2,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment