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

Side by Side Diff: base/sys_info.cc

Issue 699173002: UMA: Set Hardware model class on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile on ios Created 6 years, 1 month 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_mac.cc » ('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/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 26 matching lines...) Expand all
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
OLDNEW
« no previous file with comments | « base/sys_info.h ('k') | base/sys_info_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698