| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // A simple daemon to detect, mount, and eject removable storage devices. |
| 6 |
| 7 #include <base/file_util.h> |
| 8 #include <base/logging.h> |
| 9 #include <base/string_util.h> |
| 10 #include <dbus-c++/glib-integration.h> |
| 11 #include <dbus-c++/util.h> |
| 12 #include <gflags/gflags.h> |
| 13 #include <glib-object.h> |
| 14 #include <glib.h> |
| 15 #include <metrics/metrics_library.h> |
| 16 |
| 17 int main(int argc, char** argv) { |
| 18 ::g_type_init(); |
| 19 g_thread_init(NULL); |
| 20 google::ParseCommandLineFlags(&argc, &argv, true); |
| 21 |
| 22 LOG(INFO) << "Creating a GMainLoop"; |
| 23 GMainLoop* loop = g_main_loop_new(g_main_context_default(), FALSE); |
| 24 |
| 25 LOG(INFO) << "Initializing the metrics library"; |
| 26 MetricsLibrary metrics_lib; |
| 27 metrics_lib.Init(); |
| 28 |
| 29 // Run the main loop until exit time: |
| 30 // TODO(rtc): daemonize this |
| 31 g_main_loop_run(loop); |
| 32 |
| 33 return 0; |
| 34 } |
| OLD | NEW |