OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/version_loader.h" | 5 #include "chrome/browser/chromeos/version_loader.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "base/string_split.h" | 12 #include "base/string_split.h" |
13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
14 #include "base/stringprintf.h" | 14 #include "base/stringprintf.h" |
15 #include "base/threading/thread.h" | 15 #include "base/threading/thread.h" |
16 #include "base/time.h" | 16 #include "base/time.h" |
17 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
18 #include "content/public/browser/browser_thread.h" | 18 #include "content/public/browser/browser_thread.h" |
19 | 19 |
| 20 using content::BrowserThread; |
| 21 |
20 namespace chromeos { | 22 namespace chromeos { |
21 | 23 |
22 // File to look for version number in. | 24 // File to look for version number in. |
23 static const char kPathVersion[] = "/etc/lsb-release"; | 25 static const char kPathVersion[] = "/etc/lsb-release"; |
24 | 26 |
25 // File to look for firmware number in. | 27 // File to look for firmware number in. |
26 static const char kPathFirmware[] = "/var/log/bios_info.txt"; | 28 static const char kPathFirmware[] = "/var/log/bios_info.txt"; |
27 | 29 |
28 VersionLoader::VersionLoader() : backend_(new Backend()) {} | 30 VersionLoader::VersionLoader() : backend_(new Backend()) {} |
29 | 31 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 std::string contents; | 169 std::string contents; |
168 const FilePath file_path(kPathFirmware); | 170 const FilePath file_path(kPathFirmware); |
169 if (file_util::ReadFileToString(file_path, &contents)) { | 171 if (file_util::ReadFileToString(file_path, &contents)) { |
170 firmware = ParseFirmware(contents); | 172 firmware = ParseFirmware(contents); |
171 } | 173 } |
172 | 174 |
173 request->ForwardResult(request->handle(), firmware); | 175 request->ForwardResult(request->handle(), firmware); |
174 } | 176 } |
175 | 177 |
176 } // namespace chromeos | 178 } // namespace chromeos |
OLD | NEW |