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

Side by Side Diff: base/sys_info_android.cc

Issue 1011433002: base: "implement" seek time detection for iOS/Android and add more stubs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ssd
Patch Set: -OS_ANDROID Created 5 years, 9 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 | « no previous file | base/sys_info_chromeos.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 <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
158 std::string SysInfo::OperatingSystemName() { 164 std::string SysInfo::OperatingSystemName() {
159 return "Android"; 165 return "Android";
160 } 166 }
161 167
162 std::string SysInfo::GetAndroidBuildCodename() { 168 std::string SysInfo::GetAndroidBuildCodename() {
163 char os_version_codename_str[PROP_VALUE_MAX]; 169 char os_version_codename_str[PROP_VALUE_MAX];
164 __system_property_get("ro.build.version.codename", os_version_codename_str); 170 __system_property_get("ro.build.version.codename", os_version_codename_str);
165 return std::string(os_version_codename_str); 171 return std::string(os_version_codename_str);
166 } 172 }
167 173
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 base::internal::LazySysInfoValue<bool, 215 base::internal::LazySysInfoValue<bool,
210 android::SysUtils::IsLowEndDeviceFromJni> >::Leaky 216 android::SysUtils::IsLowEndDeviceFromJni> >::Leaky
211 g_lazy_low_end_device = LAZY_INSTANCE_INITIALIZER; 217 g_lazy_low_end_device = LAZY_INSTANCE_INITIALIZER;
212 218
213 bool SysInfo::IsLowEndDevice() { 219 bool SysInfo::IsLowEndDevice() {
214 return g_lazy_low_end_device.Get().value(); 220 return g_lazy_low_end_device.Get().value();
215 } 221 }
216 222
217 223
218 } // namespace base 224 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/sys_info_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698