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 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" | 5 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/common/chrome_switches.h" | 8 #include "chrome/common/chrome_switches.h" |
9 | 9 |
10 namespace policy { | 10 namespace policy { |
(...skipping 21 matching lines...) Expand all Loading... |
32 const char kValueRequestUnregister[] = "unregister"; | 32 const char kValueRequestUnregister[] = "unregister"; |
33 const char kValueRequestUploadCertificate[] = "cert_upload"; | 33 const char kValueRequestUploadCertificate[] = "cert_upload"; |
34 const char kValueUserAffiliationManaged[] = "managed"; | 34 const char kValueUserAffiliationManaged[] = "managed"; |
35 const char kValueUserAffiliationNone[] = "none"; | 35 const char kValueUserAffiliationNone[] = "none"; |
36 | 36 |
37 const char kChromeDevicePolicyType[] = "google/chromeos/device"; | 37 const char kChromeDevicePolicyType[] = "google/chromeos/device"; |
38 #if defined(OS_CHROMEOS) | 38 #if defined(OS_CHROMEOS) |
39 const char kChromeUserPolicyType[] = "google/chromeos/user"; | 39 const char kChromeUserPolicyType[] = "google/chromeos/user"; |
40 #elif defined(OS_ANDROID) | 40 #elif defined(OS_ANDROID) |
41 const char kChromeUserPolicyType[] = "google/android/user"; | 41 const char kChromeUserPolicyType[] = "google/android/user"; |
| 42 #elif defined(OS_IOS) |
| 43 const char kChromeUserPolicyType[] = "google/ios/user"; |
42 #else | 44 #else |
43 const char kChromeUserPolicyType[] = "google/chrome/user"; | 45 const char kChromeUserPolicyType[] = "google/chrome/user"; |
44 #endif | 46 #endif |
45 const char kChromePublicAccountPolicyType[] = "google/chromeos/publicaccount"; | 47 const char kChromePublicAccountPolicyType[] = "google/chromeos/publicaccount"; |
46 const char kChromeExtensionPolicyType[] = "google/chrome/extension"; | 48 const char kChromeExtensionPolicyType[] = "google/chrome/extension"; |
47 | 49 |
48 } // namespace dm_protocol | 50 } // namespace dm_protocol |
49 | 51 |
50 const char* GetChromeUserPolicyType() { | 52 const char* GetChromeUserPolicyType() { |
51 #if defined(OS_ANDROID) | 53 #if defined(OS_ANDROID) || defined(OS_IOS) |
52 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 54 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
53 if (command_line->HasSwitch(switches::kFakeCloudPolicyType)) | 55 if (command_line->HasSwitch(switches::kFakeCloudPolicyType)) |
54 return "google/chrome/user"; | 56 return "google/chrome/user"; |
55 #endif | 57 #endif |
56 return dm_protocol::kChromeUserPolicyType; | 58 return dm_protocol::kChromeUserPolicyType; |
57 } | 59 } |
58 | 60 |
59 } // namespace policy | 61 } // namespace policy |
OLD | NEW |