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

Side by Side Diff: main.cc

Issue 3541011: entd: Add policy signatures (Closed) Base URL: http://git.chromium.org/git/entd.git
Patch Set: Address review comments Created 10 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 | Annotate | Revision Log
« no previous file with comments | « bin/fix_pkcs11_token.sh ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS 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 <stdio.h> 5 #include <stdio.h>
6 #include <syslog.h> 6 #include <syslog.h>
7 7
8 // syslog.h and base/logging.h both try to #define LOG_INFO and LOG_WARNING. 8 // syslog.h and base/logging.h both try to #define LOG_INFO and LOG_WARNING.
9 // We need to #undef at least these two before including base/logging.h. The 9 // We need to #undef at least these two before including base/logging.h. The
10 // others are included to be consistent. 10 // others are included to be consistent.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 if (valid_policy) { 151 if (valid_policy) {
152 FilePath path = FilePath(extension_path).Append("policy.js"); 152 FilePath path = FilePath(extension_path).Append("policy.js");
153 if (file_util::PathExists(path)) 153 if (file_util::PathExists(path))
154 policy = path.value(); 154 policy = path.value();
155 155
156 path = FilePath(extension_path).Append("manifest.json"); 156 path = FilePath(extension_path).Append("manifest.json");
157 if (file_util::PathExists(path)) 157 if (file_util::PathExists(path))
158 manifest = path.value(); 158 manifest = path.value();
159 159
160 path = FilePath(extension_path).Append("root_ca.pem"); 160 path = FilePath(extension_path).Append("root-ca.pem");
161 if (file_util::PathExists(path)) 161 if (file_util::PathExists(path)) {
162 root_ca_file = path.value(); 162 root_ca_file = path.value();
163 } else {
164 // Backwards compatibility for old filename with underscore.
165 path = FilePath(extension_path).Append("root_ca.pem");
166 if (file_util::PathExists(path))
167 root_ca_file = path.value();
168 }
163 } 169 }
164 170
165 // Command line switches for policy files override extension filepaths 171 // Command line switches for policy files override extension filepaths
166 if (cl->HasSwitch(switches::kPolicy)) 172 if (cl->HasSwitch(switches::kPolicy))
167 policy = cl->GetSwitchValueASCII(switches::kPolicy); 173 policy = cl->GetSwitchValueASCII(switches::kPolicy);
168 if (cl->HasSwitch(switches::kManifest)) 174 if (cl->HasSwitch(switches::kManifest))
169 manifest = cl->GetSwitchValueASCII(switches::kManifest); 175 manifest = cl->GetSwitchValueASCII(switches::kManifest);
170 if (cl->HasSwitch(switches::kUtility)) 176 if (cl->HasSwitch(switches::kUtility))
171 utility = cl->GetSwitchValueASCII(switches::kUtility); 177 utility = cl->GetSwitchValueASCII(switches::kUtility);
172 178
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 if (!manifest.empty()) 219 if (!manifest.empty())
214 d.SetManifestFile(manifest); 220 d.SetManifestFile(manifest);
215 221
216 if (!policy.empty()) 222 if (!policy.empty())
217 d.SetPolicyFile(policy); 223 d.SetPolicyFile(policy);
218 224
219 uint32_t rv = d.Run(); 225 uint32_t rv = d.Run();
220 LOG(INFO) << "Exiting entd with code: " << rv; 226 LOG(INFO) << "Exiting entd with code: " << rv;
221 return rv; 227 return rv;
222 } 228 }
OLDNEW
« no previous file with comments | « bin/fix_pkcs11_token.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698