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

Side by Side Diff: base/ios/device_util.h

Issue 10818023: Implements iOS device util methods. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: sync Created 8 years, 4 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 unified diff | Download patch
« no previous file with comments | « base/base.gypi ('k') | base/ios/device_util.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium 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 #ifndef BASE_IOS_DEVICE_UTIL_H_
6 #define BASE_IOS_DEVICE_UTIL_H_
7
8 #include <string>
9
10 namespace ios {
11 namespace device_util {
12
13 // Returns the hardware version of the device the app is running on.
14 //
15 // The returned string is the string returned by sysctlbyname() with name
16 // "hw.machine". Possible (known) values include:
17 //
18 // iPhone1,1 -> iPhone 1G
19 // iPhone1,2 -> iPhone 3G
20 // iPhone2,1 -> iPhone 3GS
21 // iPhone3,1 -> iPhone 4/AT&T
22 // iPhone3,2 -> iPhone 4/Other Carrier?
23 // iPhone3,3 -> iPhone 4/Other Carrier?
24 // iPhone4,1 -> iPhone 4S
25 //
26 // iPod1,1 -> iPod touch 1G
27 // iPod2,1 -> iPod touch 2G
28 // iPod2,2 -> ?
29 // iPod3,1 -> iPod touch 3G
30 // iPod4,1 -> iPod touch 4G
31 // iPod5,1 -> ?
32 //
33 // iPad1,1 -> iPad 1G, WiFi
34 // iPad1,? -> iPad 1G, 3G <- needs 3G owner to test
35 // iPad2,1 -> iPad 2G, WiFi
36 //
37 // AppleTV2,1 -> AppleTV 2
38 //
39 // i386 -> Simulator
40 // x86_64 -> Simulator
41 std::string GetPlatform();
42
43 // Returns true if the application is running on a high-ram device. (>=250M).
44 bool IsRunningOnHighRamDevice();
45
46 // Returns true if the device has only one core.
47 bool IsSingleCoreDevice();
48
49 // Returns the MAC address of the interface with name |interface_name|.
50 std::string GetMacAddress(const std::string& interface_name);
51
52 // Returns a random UUID.
53 std::string GetRandomId();
54
55 // Returns an identifier for the device, using the given |salt|. A global
56 // identifier is generated the first time this method is called, and the salt
57 // is used to be able to generate distinct identifiers for the same device. If
58 // |salt| is NULL, a default value is used. Unless you are using this value for
59 // something that should be anonymous, you should probably pass NULL.
60 std::string GetDeviceIdentifier(const char* salt);
61
62 } // namespace device_util
63 } // namespace ios
64
65 #endif // BASE_IOS_DEVICE_UTIL_H_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/ios/device_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698