| 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 "components/policy/core/common/cloud/cloud_policy_constants.h" | 5 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 const char kValueRequestUnregister[] = "unregister"; | 38 const char kValueRequestUnregister[] = "unregister"; |
| 39 const char kValueRequestUploadCertificate[] = "cert_upload"; | 39 const char kValueRequestUploadCertificate[] = "cert_upload"; |
| 40 const char kValueRequestDeviceStateRetrieval[] = "device_state_retrieval"; | 40 const char kValueRequestDeviceStateRetrieval[] = "device_state_retrieval"; |
| 41 const char kValueRequestUploadStatus[] = "status_upload"; | 41 const char kValueRequestUploadStatus[] = "status_upload"; |
| 42 const char kValueRequestRemoteCommands[] = "remote_commands"; | 42 const char kValueRequestRemoteCommands[] = "remote_commands"; |
| 43 const char kValueRequestDeviceAttributeUpdatePermission[] = | 43 const char kValueRequestDeviceAttributeUpdatePermission[] = |
| 44 "device_attribute_update_permission"; | 44 "device_attribute_update_permission"; |
| 45 const char kValueRequestDeviceAttributeUpdate[] = "device_attribute_update"; | 45 const char kValueRequestDeviceAttributeUpdate[] = "device_attribute_update"; |
| 46 const char kValueRequestGcmIdUpdate[] = "gcm_id_update"; | 46 const char kValueRequestGcmIdUpdate[] = "gcm_id_update"; |
| 47 const char kValueRequestCheckAndroidManagement[] = "check_android_management"; | 47 const char kValueRequestCheckAndroidManagement[] = "check_android_management"; |
| 48 const char kValueRequestCertBasedRegister[] = "certificate_based_register"; |
| 48 | 49 |
| 49 const char kChromeDevicePolicyType[] = "google/chromeos/device"; | 50 const char kChromeDevicePolicyType[] = "google/chromeos/device"; |
| 50 #if defined(OS_CHROMEOS) | 51 #if defined(OS_CHROMEOS) |
| 51 const char kChromeUserPolicyType[] = "google/chromeos/user"; | 52 const char kChromeUserPolicyType[] = "google/chromeos/user"; |
| 52 #elif defined(OS_ANDROID) | 53 #elif defined(OS_ANDROID) |
| 53 const char kChromeUserPolicyType[] = "google/android/user"; | 54 const char kChromeUserPolicyType[] = "google/android/user"; |
| 54 #elif defined(OS_IOS) | 55 #elif defined(OS_IOS) |
| 55 const char kChromeUserPolicyType[] = "google/ios/user"; | 56 const char kChromeUserPolicyType[] = "google/ios/user"; |
| 56 #else | 57 #else |
| 57 const char kChromeUserPolicyType[] = "google/chrome/user"; | 58 const char kChromeUserPolicyType[] = "google/chrome/user"; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 97 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 97 if (command_line->HasSwitch(switches::kDisablePolicyKeyVerification)) { | 98 if (command_line->HasSwitch(switches::kDisablePolicyKeyVerification)) { |
| 98 return std::string(); | 99 return std::string(); |
| 99 } else { | 100 } else { |
| 100 return std::string(reinterpret_cast<const char*>(kPolicyVerificationKey), | 101 return std::string(reinterpret_cast<const char*>(kPolicyVerificationKey), |
| 101 sizeof(kPolicyVerificationKey)); | 102 sizeof(kPolicyVerificationKey)); |
| 102 } | 103 } |
| 103 } | 104 } |
| 104 | 105 |
| 105 } // namespace policy | 106 } // namespace policy |
| OLD | NEW |