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/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/environment.h" | 8 #include "base/environment.h" |
9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 static LazyInstance<ChromeOSVersionInfo> | 163 static LazyInstance<ChromeOSVersionInfo> |
164 g_chrome_os_version_info = LAZY_INSTANCE_INITIALIZER; | 164 g_chrome_os_version_info = LAZY_INSTANCE_INITIALIZER; |
165 | 165 |
166 ChromeOSVersionInfo& GetChromeOSVersionInfo() { | 166 ChromeOSVersionInfo& GetChromeOSVersionInfo() { |
167 return g_chrome_os_version_info.Get(); | 167 return g_chrome_os_version_info.Get(); |
168 } | 168 } |
169 | 169 |
170 } // namespace | 170 } // namespace |
171 | 171 |
| 172 bool SysInfo::HasSeekPenalty(const FilePath& path, bool* has_seek_penalty) { |
| 173 // TODO(dbeam): implement. Can we just use boards/models? |
| 174 return false; |
| 175 } |
| 176 |
172 // static | 177 // static |
173 void SysInfo::OperatingSystemVersionNumbers(int32* major_version, | 178 void SysInfo::OperatingSystemVersionNumbers(int32* major_version, |
174 int32* minor_version, | 179 int32* minor_version, |
175 int32* bugfix_version) { | 180 int32* bugfix_version) { |
176 return GetChromeOSVersionInfo().GetVersionNumbers( | 181 return GetChromeOSVersionInfo().GetVersionNumbers( |
177 major_version, minor_version, bugfix_version); | 182 major_version, minor_version, bugfix_version); |
178 } | 183 } |
179 | 184 |
180 // static | 185 // static |
181 const SysInfo::LsbReleaseMap& SysInfo::GetLsbReleaseMap() { | 186 const SysInfo::LsbReleaseMap& SysInfo::GetLsbReleaseMap() { |
(...skipping 28 matching lines...) Expand all Loading... |
210 void SysInfo::SetChromeOSVersionInfoForTest(const std::string& lsb_release, | 215 void SysInfo::SetChromeOSVersionInfoForTest(const std::string& lsb_release, |
211 const Time& lsb_release_time) { | 216 const Time& lsb_release_time) { |
212 scoped_ptr<Environment> env(Environment::Create()); | 217 scoped_ptr<Environment> env(Environment::Create()); |
213 env->SetVar(kLsbReleaseKey, lsb_release); | 218 env->SetVar(kLsbReleaseKey, lsb_release); |
214 env->SetVar(kLsbReleaseTimeKey, | 219 env->SetVar(kLsbReleaseTimeKey, |
215 DoubleToString(lsb_release_time.ToDoubleT())); | 220 DoubleToString(lsb_release_time.ToDoubleT())); |
216 g_chrome_os_version_info.Get().Parse(); | 221 g_chrome_os_version_info.Get().Parse(); |
217 } | 222 } |
218 | 223 |
219 } // namespace base | 224 } // namespace base |
OLD | NEW |