OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_util.h" | 13 #include "base/string_util.h" |
13 #include "base/thread.h" | 14 #include "base/thread.h" |
14 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
15 | 16 |
16 namespace chromeos { | 17 namespace chromeos { |
17 | 18 |
18 // Beginning of line we look for that gives version number. | 19 // Beginning of line we look for that gives version number. |
19 static const char kPrefix[] = "CHROMEOS_RELEASE_DESCRIPTION="; | 20 static const char kPrefix[] = "CHROMEOS_RELEASE_DESCRIPTION="; |
20 | 21 |
21 // File to look for version number in. | 22 // File to look for version number in. |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 74 |
74 std::string version; | 75 std::string version; |
75 std::string contents; | 76 std::string contents; |
76 if (file_util::ReadFileToString(FilePath(kPath), &contents)) | 77 if (file_util::ReadFileToString(FilePath(kPath), &contents)) |
77 version = ParseVersion(contents); | 78 version = ParseVersion(contents); |
78 request->ForwardResult(GetVersionCallback::TupleType(request->handle(), | 79 request->ForwardResult(GetVersionCallback::TupleType(request->handle(), |
79 version)); | 80 version)); |
80 } | 81 } |
81 | 82 |
82 } // namespace chromeos | 83 } // namespace chromeos |
OLD | NEW |