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

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

Issue 1543423002: Switch to standard integer types in components/policy/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 "base/basictypes.h" 7 #include <stdint.h>
8
8 #include "base/command_line.h" 9 #include "base/command_line.h"
9 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "build/build_config.h"
10 #include "components/policy/core/common/policy_switches.h" 12 #include "components/policy/core/common/policy_switches.h"
11 #include "policy/proto/device_management_backend.pb.h" 13 #include "policy/proto/device_management_backend.pb.h"
12 14
13 namespace em = enterprise_management; 15 namespace em = enterprise_management;
14 16
15 namespace policy { 17 namespace policy {
16 18
17 // Constants related to the device management protocol. 19 // Constants related to the device management protocol.
18 namespace dm_protocol { 20 namespace dm_protocol {
19 21
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #else 55 #else
54 const char kChromeUserPolicyType[] = "google/chrome/user"; 56 const char kChromeUserPolicyType[] = "google/chrome/user";
55 #endif 57 #endif
56 const char kChromePublicAccountPolicyType[] = "google/chromeos/publicaccount"; 58 const char kChromePublicAccountPolicyType[] = "google/chromeos/publicaccount";
57 const char kChromeExtensionPolicyType[] = "google/chrome/extension"; 59 const char kChromeExtensionPolicyType[] = "google/chrome/extension";
58 60
59 } // namespace dm_protocol 61 } // namespace dm_protocol
60 62
61 const char kChromePolicyHeader[] = "Chrome-Policy-Posture"; 63 const char kChromePolicyHeader[] = "Chrome-Policy-Posture";
62 64
63 const uint8 kPolicyVerificationKey[] = { 65 const uint8_t kPolicyVerificationKey[] = {
64 0x30, 0x82, 0x01, 0x22, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 66 0x30, 0x82, 0x01, 0x22, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86,
65 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0F, 0x00, 0x30, 0x82, 67 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0F, 0x00,
66 0x01, 0x0A, 0x02, 0x82, 0x01, 0x01, 0x00, 0xA7, 0xB3, 0xF9, 0x0D, 0xC7, 0xC7, 68 0x30, 0x82, 0x01, 0x0A, 0x02, 0x82, 0x01, 0x01, 0x00, 0xA7, 0xB3, 0xF9,
67 0x8D, 0x84, 0x3D, 0x4B, 0x80, 0xDD, 0x9A, 0x2F, 0xF8, 0x69, 0xD4, 0xD1, 0x14, 69 0x0D, 0xC7, 0xC7, 0x8D, 0x84, 0x3D, 0x4B, 0x80, 0xDD, 0x9A, 0x2F, 0xF8,
68 0x5A, 0xCA, 0x04, 0x4B, 0x1C, 0xBC, 0x28, 0xEB, 0x5E, 0x10, 0x01, 0x36, 0xFD, 70 0x69, 0xD4, 0xD1, 0x14, 0x5A, 0xCA, 0x04, 0x4B, 0x1C, 0xBC, 0x28, 0xEB,
69 0x81, 0xEB, 0xE4, 0x3C, 0x16, 0x40, 0xA5, 0x8A, 0xE6, 0x08, 0xEE, 0xEF, 0x39, 71 0x5E, 0x10, 0x01, 0x36, 0xFD, 0x81, 0xEB, 0xE4, 0x3C, 0x16, 0x40, 0xA5,
70 0x1F, 0x6B, 0x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, 0x36, 0x6E, 0x25, 0xF3, 86 0xBD, 0xE6, 0x64, 0x9F, 0x26, 0x9A, 0x2B, 0x97, 0x69, 0xA9, 0xBA, 0x0B,
85 0xC7, 0xC0, 0x61, 0xFC, 0xEC, 0x66, 0x9D, 0x31, 0xD4, 0xD6, 0xB6, 0x36, 0xE3, 87 0xBD, 0x48, 0xE4, 0x81, 0x6B, 0xD4, 0x4B, 0x78, 0xE6, 0xAF, 0x95, 0x66,
86 0x7F, 0x81, 0x87, 0x02, 0x03, 0x01, 0x00, 0x01 88 0xC1, 0x23, 0xDA, 0x23, 0x45, 0x36, 0x6E, 0x25, 0xF3, 0xC7, 0xC0, 0x61,
87 }; 89 0xFC, 0xEC, 0x66, 0x9D, 0x31, 0xD4, 0xD6, 0xB6, 0x36, 0xE3, 0x7F, 0x81,
90 0x87, 0x02, 0x03, 0x01, 0x00, 0x01};
88 91
89 const char kPolicyVerificationKeyHash[] = "1:356l7w"; 92 const char kPolicyVerificationKeyHash[] = "1:356l7w";
90 93
91 std::string GetPolicyVerificationKey() { 94 std::string GetPolicyVerificationKey() {
92 // Disable key verification by default until production servers generate 95 // Disable key verification by default until production servers generate
93 // the proper signatures. 96 // the proper signatures.
94 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 97 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
95 if (command_line->HasSwitch(switches::kDisablePolicyKeyVerification)) { 98 if (command_line->HasSwitch(switches::kDisablePolicyKeyVerification)) {
96 return std::string(); 99 return std::string();
97 } else { 100 } else {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 NOTREACHED(); 136 NOTREACHED();
134 return MANAGEMENT_MODE_LOCAL_OWNER; 137 return MANAGEMENT_MODE_LOCAL_OWNER;
135 } 138 }
136 } 139 }
137 140
138 return policy_data.has_request_token() ? 141 return policy_data.has_request_token() ?
139 MANAGEMENT_MODE_ENTERPRISE_MANAGED : MANAGEMENT_MODE_LOCAL_OWNER; 142 MANAGEMENT_MODE_ENTERPRISE_MANAGED : MANAGEMENT_MODE_LOCAL_OWNER;
140 } 143 }
141 144
142 } // namespace policy 145 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698