| 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" |
| 11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 12 #include "components/policy/core/common/policy_switches.h" | 12 #include "components/policy/core/common/policy_switches.h" |
| 13 #include "components/policy/proto/device_management_backend.pb.h" | 13 #include "components/policy/proto/device_management_backend.pb.h" |
| 14 | 14 |
| 15 namespace em = enterprise_management; | 15 namespace em = enterprise_management; |
| 16 | 16 |
| 17 namespace policy { | 17 namespace policy { |
| 18 | 18 |
| 19 // Constants related to the device management protocol. | 19 // Constants related to the device management protocol. |
| 20 namespace dm_protocol { | 20 namespace dm_protocol { |
| 21 | 21 |
| 22 // Name constants for URL query parameters. | 22 // Name constants for URL query parameters. |
| 23 const char kParamAgent[] = "agent"; | 23 const char kParamAgent[] = "agent"; |
| 24 const char kParamAppType[] = "apptype"; | 24 const char kParamAppType[] = "apptype"; |
| 25 const char kParamCritical[] = "critical"; |
| 25 const char kParamDeviceID[] = "deviceid"; | 26 const char kParamDeviceID[] = "deviceid"; |
| 26 const char kParamDeviceType[] = "devicetype"; | 27 const char kParamDeviceType[] = "devicetype"; |
| 27 const char kParamLastError[] = "lasterror"; | 28 const char kParamLastError[] = "lasterror"; |
| 28 const char kParamOAuthToken[] = "oauth_token"; | 29 const char kParamOAuthToken[] = "oauth_token"; |
| 29 const char kParamPlatform[] = "platform"; | 30 const char kParamPlatform[] = "platform"; |
| 30 const char kParamRequest[] = "request"; | 31 const char kParamRequest[] = "request"; |
| 31 const char kParamRetry[] = "retry"; | 32 const char kParamRetry[] = "retry"; |
| 32 | 33 |
| 33 // String constants for the device and app type we report to the server. | 34 // String constants for the device and app type we report to the server. |
| 34 const char kValueAppType[] = "Chrome"; | 35 const char kValueAppType[] = "Chrome"; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 100 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 100 if (command_line->HasSwitch(switches::kDisablePolicyKeyVerification)) { | 101 if (command_line->HasSwitch(switches::kDisablePolicyKeyVerification)) { |
| 101 return std::string(); | 102 return std::string(); |
| 102 } else { | 103 } else { |
| 103 return std::string(reinterpret_cast<const char*>(kPolicyVerificationKey), | 104 return std::string(reinterpret_cast<const char*>(kPolicyVerificationKey), |
| 104 sizeof(kPolicyVerificationKey)); | 105 sizeof(kPolicyVerificationKey)); |
| 105 } | 106 } |
| 106 } | 107 } |
| 107 | 108 |
| 108 } // namespace policy | 109 } // namespace policy |
| OLD | NEW |