From d2d743972bef83f5241f02765aa0f3e3a50d43bd Mon Sep 17 00:00:00 2001 From: "sdefresne@chromium.org" Date: Wed, 23 Oct 2013 15:09:38 +0000 Subject: Implements RLZ lib for iOS Use the OS X implementation of the RlzValueStore and derive the machine identifier from -[UIDevice identifierForVendor]. BUG=309629 Review URL: https://codereview.chromium.org/29873005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230429 0039d316-1c4b-4281-b951-d872f2087c98 --- rlz/ios/lib/machine_id_ios.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 rlz/ios/lib/machine_id_ios.cc (limited to 'rlz/ios') diff --git a/rlz/ios/lib/machine_id_ios.cc b/rlz/ios/lib/machine_id_ios.cc new file mode 100644 index 0000000..3440978 --- /dev/null +++ b/rlz/ios/lib/machine_id_ios.cc @@ -0,0 +1,17 @@ +// Copyright 2013 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 "base/ios/device_util.h" +#include "base/strings/string16.h" +#include "base/strings/utf_string_conversions.h" + +namespace rlz_lib { + +bool GetRawMachineId(string16* data, int* more_data) { + *data = ASCIIToUTF16(ios::device_util::GetDeviceIdentifier(NULL)); + *more_data = 1; + return true; +} + +} // namespace rlz_lib -- cgit v1.1