Chromium Code Reviews| Index: cryptohomed.cc |
| diff --git a/cryptohomed.cc b/cryptohomed.cc |
| index 0ad6be6f10c209dbb80fba4f9cf79e47b40171c2..c05630ff7a8cf499e6159a0c7e6ebf3eaed61963 100644 |
| --- a/cryptohomed.cc |
| +++ b/cryptohomed.cc |
| @@ -25,11 +25,12 @@ |
| namespace switches { |
| // Keeps std* open for debugging |
| static const char *kNoCloseOnDaemonize = "noclose"; |
| +} // namespace switches |
| + |
| // Enable PKCS#11 initialization via cryptohomed |
| -// TODO(gauravsh): crosbug.com/14277 Remove this flag once this |
| +// TODO(gauravsh): crosbug.com/14277 Remove this code once this |
| // feature is stabilized. |
| -static const char *kEnablePkcs11Init = "cryptohome-init-pkcs11"; |
| -} // namespace switches |
| +static const char *kEnablePkcs11Path = "/home/chronos/.cryptohome-init-pkcs11"; |
| int main(int argc, char **argv) { |
| ::g_type_init(); |
| @@ -43,7 +44,7 @@ int main(int argc, char **argv) { |
| int noclose = cl->HasSwitch(switches::kNoCloseOnDaemonize); |
| PLOG_IF(FATAL, daemon(0, noclose) == -1) << "Failed to daemonize"; |
| - int enable_pkcs11_init = cl->HasSwitch(switches::kEnablePkcs11Init); |
| + int enable_pkcs11_init = file_util::PathExists(FilePath(kEnablePkcs11Path)); |
|
gauravsh
2011/04/20 18:25:02
Should you use platform.FileExists here?
kmixter1
2011/04/20 19:00:58
Oddly there is none (and I actually tried that fir
|
| cryptohome::Service service(enable_pkcs11_init); |
| if (!service.Initialize()) { |
| LOG(FATAL) << "Service initialization failed"; |