| 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 | |
| 177 // static | 172 // static |
| 178 void SysInfo::OperatingSystemVersionNumbers(int32* major_version, | 173 void SysInfo::OperatingSystemVersionNumbers(int32* major_version, |
| 179 int32* minor_version, | 174 int32* minor_version, |
| 180 int32* bugfix_version) { | 175 int32* bugfix_version) { |
| 181 return GetChromeOSVersionInfo().GetVersionNumbers( | 176 return GetChromeOSVersionInfo().GetVersionNumbers( |
| 182 major_version, minor_version, bugfix_version); | 177 major_version, minor_version, bugfix_version); |
| 183 } | 178 } |
| 184 | 179 |
| 185 // static | 180 // static |
| 186 const SysInfo::LsbReleaseMap& SysInfo::GetLsbReleaseMap() { | 181 const SysInfo::LsbReleaseMap& SysInfo::GetLsbReleaseMap() { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 215 void SysInfo::SetChromeOSVersionInfoForTest(const std::string& lsb_release, | 210 void SysInfo::SetChromeOSVersionInfoForTest(const std::string& lsb_release, |
| 216 const Time& lsb_release_time) { | 211 const Time& lsb_release_time) { |
| 217 scoped_ptr<Environment> env(Environment::Create()); | 212 scoped_ptr<Environment> env(Environment::Create()); |
| 218 env->SetVar(kLsbReleaseKey, lsb_release); | 213 env->SetVar(kLsbReleaseKey, lsb_release); |
| 219 env->SetVar(kLsbReleaseTimeKey, | 214 env->SetVar(kLsbReleaseTimeKey, |
| 220 DoubleToString(lsb_release_time.ToDoubleT())); | 215 DoubleToString(lsb_release_time.ToDoubleT())); |
| 221 g_chrome_os_version_info.Get().Parse(); | 216 g_chrome_os_version_info.Get().Parse(); |
| 222 } | 217 } |
| 223 | 218 |
| 224 } // namespace base | 219 } // namespace base |
| OLD | NEW |