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

Unified Diff: remoting/host/remoting_me2me_host.cc

Issue 10909090: Implement DaemonController::GetVersion() method on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | « remoting/host/plugin/daemon_controller_linux.cc ('k') | remoting/remoting.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/remoting_me2me_host.cc
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index 65daa1260e1e6acf705b6c44eb5b6595aa26fdf7..81a3878fce1f39a1a16c83f2072a15889e1517a1 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -17,6 +17,7 @@
#include "base/message_loop.h"
#include "base/scoped_native_library.h"
#include "base/string_util.h"
+#include "base/stringize_macros.h"
#include "base/synchronization/waitable_event.h"
#include "base/threading/thread.h"
#include "base/utf_string_conversions.h"
@@ -81,6 +82,9 @@ const char kApplicationName[] = "chromoting";
// The command line switch specifying the name of the daemon IPC endpoint.
const char kDaemonIpcSwitchName[] = "daemon-pipe";
+// The command line switch used to get version of the daemon.
+const char kVersionSwitchName[] = "version";
+
const char kUnofficialOAuth2ClientId[] =
"440925447803-2pi3v45bff6tp1rde2f7q6lgbor3o5uj.apps.googleusercontent.com";
const char kUnofficialOAuth2ClientSecret[] = "W2ieEsG-R1gIA4MMurGrgMc_";
@@ -698,6 +702,11 @@ int main(int argc, char** argv) {
// LazyInstance, MessageLoop).
base::AtExitManager exit_manager;
+ if (CommandLine::ForCurrentProcess()->HasSwitch(kVersionSwitchName)) {
+ printf("%s\n", STRINGIZE(VERSION));
+ return 0;
+ }
+
// Initialize logging with an appropriate log-file location, and default to
// log to that on Windows, or to standard error output otherwise.
FilePath debug_log = remoting::GetConfigDir().
« no previous file with comments | « remoting/host/plugin/daemon_controller_linux.cc ('k') | remoting/remoting.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698