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

Unified Diff: main.cc

Issue 6740015: Adds the first bits of our disks daemon. (Closed) Base URL: ssh://gitrw.chromium.org:9222/cros-disks.git@master
Patch Set: line wraps Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « inherit-review-settings-ok ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: main.cc
diff --git a/main.cc b/main.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a38faa0cab143d82c2fe95145c085465e5042184
--- /dev/null
+++ b/main.cc
@@ -0,0 +1,34 @@
+// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// A simple daemon to detect, mount, and eject removable storage devices.
+
+#include <base/file_util.h>
+#include <base/logging.h>
+#include <base/string_util.h>
+#include <dbus-c++/glib-integration.h>
+#include <dbus-c++/util.h>
+#include <gflags/gflags.h>
+#include <glib-object.h>
+#include <glib.h>
+#include <metrics/metrics_library.h>
+
+int main(int argc, char** argv) {
+ ::g_type_init();
+ g_thread_init(NULL);
+ google::ParseCommandLineFlags(&argc, &argv, true);
+
+ LOG(INFO) << "Creating a GMainLoop";
+ GMainLoop* loop = g_main_loop_new(g_main_context_default(), FALSE);
+
+ LOG(INFO) << "Initializing the metrics library";
+ MetricsLibrary metrics_lib;
+ metrics_lib.Init();
+
+ // Run the main loop until exit time:
+ // TODO(rtc): daemonize this
+ g_main_loop_run(loop);
+
+ return 0;
+}
« no previous file with comments | « inherit-review-settings-ok ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698