| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "cryptohome/service.h" | 5 #include "service.h" |
| 6 | 6 |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 #include <unistd.h> | 8 #include <unistd.h> |
| 9 | 9 |
| 10 #include <base/command_line.h> | 10 #include <base/command_line.h> |
| 11 #include <base/logging.h> | 11 #include <base/logging.h> |
| 12 | 12 |
| 13 // TODO(wad) This is a placeholder DBus service which allows | 13 // TODO(wad) This is a placeholder DBus service which allows |
| 14 // chrome-login (and anything else running as chronos) | 14 // chrome-login (and anything else running as chronos) |
| 15 // to request to mount, unmount, or check if a mapper | 15 // to request to mount, unmount, or check if a mapper |
| (...skipping 23 matching lines...) Expand all Loading... |
| 39 // Allow the commands to be configurable. | 39 // Allow the commands to be configurable. |
| 40 CommandLine *cl = CommandLine::ForCurrentProcess(); | 40 CommandLine *cl = CommandLine::ForCurrentProcess(); |
| 41 int noclose = cl->HasSwitch(switches::kNoCloseOnDaemonize); | 41 int noclose = cl->HasSwitch(switches::kNoCloseOnDaemonize); |
| 42 PLOG_IF(FATAL, daemon(0, noclose) == -1) << "Failed to daemonize"; | 42 PLOG_IF(FATAL, daemon(0, noclose) == -1) << "Failed to daemonize"; |
| 43 | 43 |
| 44 LOG_IF(FATAL, !service.Register(chromeos::dbus::GetSystemBusConnection())) | 44 LOG_IF(FATAL, !service.Register(chromeos::dbus::GetSystemBusConnection())) |
| 45 << "Failed"; | 45 << "Failed"; |
| 46 LOG_IF(FATAL, !service.Run()) << "Failed"; | 46 LOG_IF(FATAL, !service.Run()) << "Failed"; |
| 47 return 0; | 47 return 0; |
| 48 } | 48 } |
| OLD | NEW |