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

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

Issue 2419783002: Add retry and lasterror parameters to DMServer requests. (Closed)
Patch Set: Add tests Created 4 years, 2 months 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 #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 kParamDeviceID[] = "deviceid"; 25 const char kParamDeviceID[] = "deviceid";
26 const char kParamDeviceType[] = "devicetype"; 26 const char kParamDeviceType[] = "devicetype";
27 const char kParamLastError[] = "lasterror";
27 const char kParamOAuthToken[] = "oauth_token"; 28 const char kParamOAuthToken[] = "oauth_token";
28 const char kParamPlatform[] = "platform"; 29 const char kParamPlatform[] = "platform";
29 const char kParamRequest[] = "request"; 30 const char kParamRequest[] = "request";
31 const char kParamRetry[] = "retry";
30 32
31 // String constants for the device and app type we report to the server. 33 // String constants for the device and app type we report to the server.
32 const char kValueAppType[] = "Chrome"; 34 const char kValueAppType[] = "Chrome";
33 const char kValueDeviceType[] = "2"; 35 const char kValueDeviceType[] = "2";
34 const char kValueRequestAutoEnrollment[] = "enterprise_check"; 36 const char kValueRequestAutoEnrollment[] = "enterprise_check";
35 const char kValueRequestPolicy[] = "policy"; 37 const char kValueRequestPolicy[] = "policy";
36 const char kValueRequestRegister[] = "register"; 38 const char kValueRequestRegister[] = "register";
37 const char kValueRequestApiAuthorization[] = "api_authorization"; 39 const char kValueRequestApiAuthorization[] = "api_authorization";
38 const char kValueRequestUnregister[] = "unregister"; 40 const char kValueRequestUnregister[] = "unregister";
39 const char kValueRequestUploadCertificate[] = "cert_upload"; 41 const char kValueRequestUploadCertificate[] = "cert_upload";
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 99 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
98 if (command_line->HasSwitch(switches::kDisablePolicyKeyVerification)) { 100 if (command_line->HasSwitch(switches::kDisablePolicyKeyVerification)) {
99 return std::string(); 101 return std::string();
100 } else { 102 } else {
101 return std::string(reinterpret_cast<const char*>(kPolicyVerificationKey), 103 return std::string(reinterpret_cast<const char*>(kPolicyVerificationKey),
102 sizeof(kPolicyVerificationKey)); 104 sizeof(kPolicyVerificationKey));
103 } 105 }
104 } 106 }
105 107
106 } // namespace policy 108 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698