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

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

Issue 742513006: Add ManagementMode enum and GetManagementMode(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 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 #include <utility> 9 #include <utility>
10 10
11 #include "components/policy/policy_export.h" 11 #include "components/policy/policy_export.h"
12 12
13 namespace enterprise_management {
14 class PolicyData;
15 }
16
13 namespace policy { 17 namespace policy {
14 18
15 // Constants related to the device management protocol. 19 // Constants related to the device management protocol.
16 namespace dm_protocol { 20 namespace dm_protocol {
17 21
18 // Name extern constants for URL query parameters. 22 // Name extern constants for URL query parameters.
19 POLICY_EXPORT extern const char kParamAgent[]; 23 POLICY_EXPORT extern const char kParamAgent[];
20 POLICY_EXPORT extern const char kParamAppType[]; 24 POLICY_EXPORT extern const char kParamAppType[];
21 POLICY_EXPORT extern const char kParamDeviceID[]; 25 POLICY_EXPORT extern const char kParamDeviceID[];
22 POLICY_EXPORT extern const char kParamDeviceType[]; 26 POLICY_EXPORT extern const char kParamDeviceType[];
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 128
125 // A pair that combines a policy fetch type and entity ID. 129 // A pair that combines a policy fetch type and entity ID.
126 typedef std::pair<std::string, std::string> PolicyNamespaceKey; 130 typedef std::pair<std::string, std::string> PolicyNamespaceKey;
127 131
128 // Returns the Chrome user policy type to use. This allows overridding the 132 // Returns the Chrome user policy type to use. This allows overridding the
129 // default user policy type on Android and iOS for testing purposes. 133 // default user policy type on Android and iOS for testing purposes.
130 // TODO(joaodasilva): remove this once the server is ready. 134 // TODO(joaodasilva): remove this once the server is ready.
131 // http://crbug.com/248527 135 // http://crbug.com/248527
132 POLICY_EXPORT const char* GetChromeUserPolicyType(); 136 POLICY_EXPORT const char* GetChromeUserPolicyType();
133 137
138 // An enum that indicates if a device that is local owned, enterprise-managed,
Mattias Nissler (ping if slow) 2014/11/28 09:21:18 suggestion: s/that is local owned,/has a local own
bartfab (slow) 2014/11/28 13:56:54 I think that naming will still be wrong. Consumer
davidyu 2014/11/29 01:50:13 I think it's hard to have a precise name while kee
davidyu 2014/11/29 01:50:13 Done.
139 // or consumer-managed.
140 enum ManagementMode {
141 MANAGEMENT_MODE_LOCAL = 0,
Mattias Nissler (ping if slow) 2014/11/28 09:21:18 for consistency, can we rename this to MANAGEMENT_
davidyu 2014/11/29 01:50:13 Done.
142 MANAGEMENT_MODE_ENTERPRISE = 1,
143 MANAGEMENT_MODE_CONSUMER = 2,
144 };
145
146 // If |management_mode| is set in |policy_data|, it simply returns it. For
bartfab (slow) 2014/11/28 13:56:53 Nit: s/it/this method/
davidyu 2014/11/29 01:50:14 Done.
147 // legacy policy data which don't have |management_mode|, it checks if
bartfab (slow) 2014/11/28 13:56:54 Nit 1: s/policy data/|policy_data|/ Nit 2: s/don't
davidyu 2014/11/29 01:50:14 Done.
148 // |request_token| is set and returns a mode for backward-compatiblity.
bartfab (slow) 2014/11/28 13:56:53 Nit: This comment goes into a lot of detail but th
davidyu 2014/11/29 01:50:13 Done.
149 ManagementMode GetManagementMode(
150 const enterprise_management::PolicyData& policy_data);
151
134 } // namespace policy 152 } // namespace policy
135 153
136 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CONSTANTS_H_ 154 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CONSTANTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698