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

Side by Side Diff: base/sys_info.cc

Issue 2860663005: Implement SysInfo::HardwareModelName() on iOS. (Closed)
Patch Set: Use different simulator macro. Created 3 years, 7 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/sys_info.h ('k') | base/sys_info_ios.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/sys_info.h" 5 #include "base/sys_info.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 // Low End Device Mode will be enabled if this client is assigned to 43 // Low End Device Mode will be enabled if this client is assigned to
44 // one of those EnabledXXX groups. 44 // one of those EnabledXXX groups.
45 if (StartsWith(group_name, "Enabled", CompareCase::SENSITIVE)) 45 if (StartsWith(group_name, "Enabled", CompareCase::SENSITIVE))
46 return true; 46 return true;
47 47
48 return g_lazy_low_end_device.Get().value(); 48 return g_lazy_low_end_device.Get().value();
49 } 49 }
50 #endif 50 #endif
51 51
52 #if (!defined(OS_MACOSX) || defined(OS_IOS)) && !defined(OS_ANDROID) 52 #if !defined(OS_MACOSX) && !defined(OS_ANDROID)
53 std::string SysInfo::HardwareModelName() { 53 std::string SysInfo::HardwareModelName() {
54 return std::string(); 54 return std::string();
55 } 55 }
56 #endif 56 #endif
57 57
58 // static 58 // static
59 base::TimeDelta SysInfo::Uptime() { 59 base::TimeDelta SysInfo::Uptime() {
60 // This code relies on an implementation detail of TimeTicks::Now() - that 60 // This code relies on an implementation detail of TimeTicks::Now() - that
61 // its return value happens to coincide with the system uptime value in 61 // its return value happens to coincide with the system uptime value in
62 // microseconds, on Win/Mac/iOS/Linux/ChromeOS and Android. 62 // microseconds, on Win/Mac/iOS/Linux/ChromeOS and Android.
63 int64_t uptime_in_microseconds = TimeTicks::Now().ToInternalValue(); 63 int64_t uptime_in_microseconds = TimeTicks::Now().ToInternalValue();
64 return base::TimeDelta::FromMicroseconds(uptime_in_microseconds); 64 return base::TimeDelta::FromMicroseconds(uptime_in_microseconds);
65 } 65 }
66 66
67 } // namespace base 67 } // namespace base
OLDNEW
« no previous file with comments | « base/sys_info.h ('k') | base/sys_info_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698