summaryrefslogtreecommitdiffstats
path: root/rlz/examples
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-22 23:58:07 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-22 23:58:07 +0000
commitd3b7dcd4ed660815cab523588cb7e622f8c871bb (patch)
tree4b63c4538428b382e829ce896cec1b797362a6d5 /rlz/examples
parent6962f3bde370e79f7f813a98a30c434c822de1e7 (diff)
downloadchromium_src-d3b7dcd4ed660815cab523588cb7e622f8c871bb.zip
chromium_src-d3b7dcd4ed660815cab523588cb7e622f8c871bb.tar.gz
chromium_src-d3b7dcd4ed660815cab523588cb7e622f8c871bb.tar.bz2
rlz: Add a binary that prints the machine id
Partners apparently need this for something. There's a Windows version of this too already, but I couldn't find the source for that. BUG=none Review URL: https://chromiumcodereview.appspot.com/10872005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152880 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'rlz/examples')
-rw-r--r--rlz/examples/rlz_id.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/rlz/examples/rlz_id.cc b/rlz/examples/rlz_id.cc
new file mode 100644
index 0000000..ce01f18
--- /dev/null
+++ b/rlz/examples/rlz_id.cc
@@ -0,0 +1,13 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "rlz/lib/machine_id.h"
+
+int main() {
+ std::string machine_id;
+ if (!rlz_lib::GetMachineId(&machine_id))
+ return 1;
+
+ printf("%s\n", machine_id.c_str());
+}