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

Side by Side Diff: base/sys_info_android.cc

Issue 1124763003: Update from https://crrev.com/327068 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: update nacl, buildtools, fix display_change_notifier_unittest Created 5 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
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 <dlfcn.h> 7 #include <dlfcn.h>
8 #include <sys/system_properties.h> 8 #include <sys/system_properties.h>
9 9
10 #include "base/android/sys_utils.h" 10 #include "base/android/sys_utils.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 result = base::SysInfo::AmountOfPhysicalMemoryMB() / 6; 148 result = base::SysInfo::AmountOfPhysicalMemoryMB() / 6;
149 } 149 }
150 result = std::min<int64>(std::max<int64>(16 * MB, result), 512 * MB) / MB; 150 result = std::min<int64>(std::max<int64>(16 * MB, result), 512 * MB) / MB;
151 return static_cast<int>(result); 151 return static_cast<int>(result);
152 } 152 }
153 153
154 } // anonymous namespace 154 } // anonymous namespace
155 155
156 namespace base { 156 namespace base {
157 157
158 bool SysInfo::HasSeekPenalty(const FilePath& path, bool* has_seek_penalty) {
159 // Find a case where this is incorrect and dbeam@ will buy you a beer.
160 *has_seek_penalty = false;
161 return true;
162 }
163
164 std::string SysInfo::OperatingSystemName() { 158 std::string SysInfo::OperatingSystemName() {
165 return "Android"; 159 return "Android";
166 } 160 }
167 161
168 std::string SysInfo::GetAndroidBuildCodename() { 162 std::string SysInfo::GetAndroidBuildCodename() {
169 char os_version_codename_str[PROP_VALUE_MAX]; 163 char os_version_codename_str[PROP_VALUE_MAX];
170 __system_property_get("ro.build.version.codename", os_version_codename_str); 164 __system_property_get("ro.build.version.codename", os_version_codename_str);
171 return std::string(os_version_codename_str); 165 return std::string(os_version_codename_str);
172 } 166 }
173 167
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 base::internal::LazySysInfoValue<bool, 209 base::internal::LazySysInfoValue<bool,
216 android::SysUtils::IsLowEndDeviceFromJni> >::Leaky 210 android::SysUtils::IsLowEndDeviceFromJni> >::Leaky
217 g_lazy_low_end_device = LAZY_INSTANCE_INITIALIZER; 211 g_lazy_low_end_device = LAZY_INSTANCE_INITIALIZER;
218 212
219 bool SysInfo::IsLowEndDevice() { 213 bool SysInfo::IsLowEndDevice() {
220 return g_lazy_low_end_device.Get().value(); 214 return g_lazy_low_end_device.Get().value();
221 } 215 }
222 216
223 217
224 } // namespace base 218 } // namespace base
OLDNEW
« no previous file with comments | « base/sys_info.h ('k') | base/sys_info_chromeos.cc » ('j') | mojo/public/tools/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698