| OLD | NEW |
| 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/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 static LazyInstance< | 37 static LazyInstance< |
| 38 internal::LazySysInfoValue<bool, DetectLowEndDevice> >::Leaky | 38 internal::LazySysInfoValue<bool, DetectLowEndDevice> >::Leaky |
| 39 g_lazy_low_end_device = LAZY_INSTANCE_INITIALIZER; | 39 g_lazy_low_end_device = LAZY_INSTANCE_INITIALIZER; |
| 40 | 40 |
| 41 // static | 41 // static |
| 42 bool SysInfo::IsLowEndDevice() { | 42 bool SysInfo::IsLowEndDevice() { |
| 43 return g_lazy_low_end_device.Get().value(); | 43 return g_lazy_low_end_device.Get().value(); |
| 44 } | 44 } |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 #if !defined(OS_MACOSX) || defined(OS_IOS) |
| 48 std::string SysInfo::HardwareModelName() { |
| 49 return std::string(); |
| 50 } |
| 51 #endif |
| 52 |
| 47 // static | 53 // static |
| 48 int64 SysInfo::Uptime() { | 54 int64 SysInfo::Uptime() { |
| 49 // This code relies on an implementation detail of TimeTicks::Now() - that | 55 // This code relies on an implementation detail of TimeTicks::Now() - that |
| 50 // its return value happens to coincide with the system uptime value in | 56 // its return value happens to coincide with the system uptime value in |
| 51 // microseconds, on Win/Mac/iOS/Linux/ChromeOS and Android. | 57 // microseconds, on Win/Mac/iOS/Linux/ChromeOS and Android. |
| 52 int64 uptime_in_microseconds = TimeTicks::Now().ToInternalValue(); | 58 int64 uptime_in_microseconds = TimeTicks::Now().ToInternalValue(); |
| 53 return uptime_in_microseconds / 1000; | 59 return uptime_in_microseconds / 1000; |
| 54 } | 60 } |
| 55 | 61 |
| 56 } // namespace base | 62 } // namespace base |
| OLD | NEW |