OLD | NEW |
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 #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CONSTANTS_H_ | 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CONSTANTS_H_ |
6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CONSTANTS_H_ | 6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CONSTANTS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "components/policy/policy_export.h" | 10 #include "components/policy/policy_export.h" |
11 | 11 |
| 12 namespace enterprise_management { |
| 13 class PolicyData; |
| 14 } |
| 15 |
12 namespace policy { | 16 namespace policy { |
13 | 17 |
14 // Constants related to the device management protocol. | 18 // Constants related to the device management protocol. |
15 namespace dm_protocol { | 19 namespace dm_protocol { |
16 | 20 |
17 // Name extern constants for URL query parameters. | 21 // Name extern constants for URL query parameters. |
18 POLICY_EXPORT extern const char kParamAgent[]; | 22 POLICY_EXPORT extern const char kParamAgent[]; |
19 POLICY_EXPORT extern const char kParamAppType[]; | 23 POLICY_EXPORT extern const char kParamAppType[]; |
20 POLICY_EXPORT extern const char kParamDeviceID[]; | 24 POLICY_EXPORT extern const char kParamDeviceID[]; |
21 POLICY_EXPORT extern const char kParamDeviceType[]; | 25 POLICY_EXPORT extern const char kParamDeviceType[]; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // consumer kiosk with ability to auto | 124 // consumer kiosk with ability to auto |
121 // launch a kiosk webapp. | 125 // launch a kiosk webapp. |
122 }; | 126 }; |
123 | 127 |
124 // Returns the Chrome user policy type to use. This allows overridding the | 128 // Returns the Chrome user policy type to use. This allows overridding the |
125 // default user policy type on Android and iOS for testing purposes. | 129 // default user policy type on Android and iOS for testing purposes. |
126 // TODO(joaodasilva): remove this once the server is ready. | 130 // TODO(joaodasilva): remove this once the server is ready. |
127 // http://crbug.com/248527 | 131 // http://crbug.com/248527 |
128 POLICY_EXPORT const char* GetChromeUserPolicyType(); | 132 POLICY_EXPORT const char* GetChromeUserPolicyType(); |
129 | 133 |
| 134 // An enum that indicates if a device that has a local owner, is enterprise- |
| 135 // managed, or is consumer-managed. This is a copy of ManagementMode in |
| 136 // PolicyData. See device_management_backend.proto for the explanation of each |
| 137 // mode. |
| 138 enum ManagementMode { |
| 139 MANAGEMENT_MODE_LOCAL_OWNER = 0, |
| 140 MANAGEMENT_MODE_ENTERPRISE_MANAGED = 1, |
| 141 MANAGEMENT_MODE_CONSUMER_MANAGED = 2, |
| 142 }; |
| 143 |
| 144 // Returns the management mode of |policy_data|. You should use this function |
| 145 // instead of using |management_mode| in |policy_data| to handle legacy |
| 146 // |policy_data| that doesn't have |management_mode| set. |
| 147 POLICY_EXPORT ManagementMode GetManagementMode( |
| 148 const enterprise_management::PolicyData& policy_data); |
| 149 |
130 } // namespace policy | 150 } // namespace policy |
131 | 151 |
132 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CONSTANTS_H_ | 152 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CONSTANTS_H_ |
OLD | NEW |