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

Side by Side Diff: components/policy/core/common/cloud/cloud_policy_constants.h

Issue 109743002: Move policy code into components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar fixes Created 7 years 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 #ifndef CHROME_BROWSER_POLICY_CLOUD_CLOUD_POLICY_CONSTANTS_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CONSTANTS_H_
6 #define CHROME_BROWSER_POLICY_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 #include <utility> 9 #include <utility>
10 10
11 #include "components/policy/policy_export.h"
12
11 namespace policy { 13 namespace policy {
12 14
13 // Constants related to the device management protocol. 15 // Constants related to the device management protocol.
14 namespace dm_protocol { 16 namespace dm_protocol {
15 17
16 // Name extern constants for URL query parameters. 18 // Name extern constants for URL query parameters.
17 extern const char kParamAgent[]; 19 POLICY_EXPORT extern const char kParamAgent[];
18 extern const char kParamAppType[]; 20 POLICY_EXPORT extern const char kParamAppType[];
19 extern const char kParamDeviceID[]; 21 POLICY_EXPORT extern const char kParamDeviceID[];
20 extern const char kParamDeviceType[]; 22 POLICY_EXPORT extern const char kParamDeviceType[];
21 extern const char kParamOAuthToken[]; 23 POLICY_EXPORT extern const char kParamOAuthToken[];
22 extern const char kParamPlatform[]; 24 POLICY_EXPORT extern const char kParamPlatform[];
23 extern const char kParamRequest[]; 25 POLICY_EXPORT extern const char kParamRequest[];
24 extern const char kParamUserAffiliation[]; 26 POLICY_EXPORT extern const char kParamUserAffiliation[];
25 27
26 // String extern constants for the device and app type we report to the server. 28 // String extern constants for the device and app type we report to the server.
27 extern const char kValueAppType[]; 29 POLICY_EXPORT extern const char kValueAppType[];
28 extern const char kValueDeviceType[]; 30 POLICY_EXPORT extern const char kValueDeviceType[];
29 extern const char kValueRequestAutoEnrollment[]; 31 POLICY_EXPORT extern const char kValueRequestAutoEnrollment[];
30 extern const char kValueRequestPolicy[]; 32 POLICY_EXPORT extern const char kValueRequestPolicy[];
31 extern const char kValueRequestRegister[]; 33 POLICY_EXPORT extern const char kValueRequestRegister[];
32 extern const char kValueRequestApiAuthorization[]; 34 POLICY_EXPORT extern const char kValueRequestApiAuthorization[];
33 extern const char kValueRequestUnregister[]; 35 POLICY_EXPORT extern const char kValueRequestUnregister[];
34 extern const char kValueRequestUploadCertificate[]; 36 POLICY_EXPORT extern const char kValueRequestUploadCertificate[];
35 extern const char kValueUserAffiliationManaged[]; 37 POLICY_EXPORT extern const char kValueUserAffiliationManaged[];
36 extern const char kValueUserAffiliationNone[]; 38 POLICY_EXPORT extern const char kValueUserAffiliationNone[];
37 39
38 // Policy type strings for the policy_type field in PolicyFetchRequest. 40 // Policy type strings for the policy_type field in PolicyFetchRequest.
39 extern const char kChromeDevicePolicyType[]; 41 POLICY_EXPORT extern const char kChromeDevicePolicyType[];
40 extern const char kChromeUserPolicyType[]; 42 POLICY_EXPORT extern const char kChromeUserPolicyType[];
41 extern const char kChromePublicAccountPolicyType[]; 43 POLICY_EXPORT extern const char kChromePublicAccountPolicyType[];
42 extern const char kChromeExtensionPolicyType[]; 44 POLICY_EXPORT extern const char kChromeExtensionPolicyType[];
43 45
44 // These codes are sent in the |error_code| field of PolicyFetchResponse. 46 // These codes are sent in the |error_code| field of PolicyFetchResponse.
45 enum PolicyFetchStatus { 47 enum PolicyFetchStatus {
46 POLICY_FETCH_SUCCESS = 200, 48 POLICY_FETCH_SUCCESS = 200,
47 POLICY_FETCH_ERROR_NOT_FOUND = 902, 49 POLICY_FETCH_ERROR_NOT_FOUND = 902,
48 }; 50 };
49 51
50 } // namespace dm_protocol 52 } // namespace dm_protocol
51 53
52 // Describes the affiliation of a user w.r.t. the device owner. 54 // Describes the affiliation of a user w.r.t. the device owner.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 DEVICE_MODE_CONSUMER_KIOSK, // The device is locally owned as consumer kiosk. 103 DEVICE_MODE_CONSUMER_KIOSK, // The device is locally owned as consumer kiosk.
102 }; 104 };
103 105
104 // A pair that combines a policy fetch type and entity ID. 106 // A pair that combines a policy fetch type and entity ID.
105 typedef std::pair<std::string, std::string> PolicyNamespaceKey; 107 typedef std::pair<std::string, std::string> PolicyNamespaceKey;
106 108
107 // Returns the Chrome user policy type to use. This allows overridding the 109 // Returns the Chrome user policy type to use. This allows overridding the
108 // default user policy type on Android and iOS for testing purposes. 110 // default user policy type on Android and iOS for testing purposes.
109 // TODO(joaodasilva): remove this once the server is ready. 111 // TODO(joaodasilva): remove this once the server is ready.
110 // http://crbug.com/248527 112 // http://crbug.com/248527
111 const char* GetChromeUserPolicyType(); 113 POLICY_EXPORT const char* GetChromeUserPolicyType();
112 114
113 } // namespace policy 115 } // namespace policy
114 116
115 #endif // CHROME_BROWSER_POLICY_CLOUD_CLOUD_POLICY_CONSTANTS_H_ 117 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CONSTANTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698