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 #ifndef CHROME_BROWSER_CHROMEOS_VERSION_LOADER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_VERSION_LOADER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_VERSION_LOADER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_VERSION_LOADER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "content/browser/cancelable_request.h" | 13 #include "content/browser/cancelable_request.h" |
14 | 14 |
15 class FilePath; | |
16 | |
17 namespace chromeos { | 15 namespace chromeos { |
18 | 16 |
19 // ChromeOSVersionLoader loads the version of Chrome OS from the file system. | 17 // ChromeOSVersionLoader loads the version of Chrome OS from the file system. |
20 // Loading is done asynchronously on the file thread. Once loaded, | 18 // Loading is done asynchronously on the file thread. Once loaded, |
21 // ChromeOSVersionLoader callback to a method of your choice with the version | 19 // ChromeOSVersionLoader callback to a method of your choice with the version |
22 // (or an empty string if the version couldn't be found). | 20 // (or an empty string if the version couldn't be found). |
23 // To use ChromeOSVersionLoader do the following: | 21 // To use ChromeOSVersionLoader do the following: |
24 // | 22 // |
25 // . In your class define a member field of type chromeos::VersionLoader and | 23 // . In your class define a member field of type chromeos::VersionLoader and |
26 // CancelableRequestConsumerBase. | 24 // CancelableRequestConsumerBase. |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 static std::string ParseFirmware(const std::string& contents); | 105 static std::string ParseFirmware(const std::string& contents); |
108 | 106 |
109 scoped_refptr<Backend> backend_; | 107 scoped_refptr<Backend> backend_; |
110 | 108 |
111 DISALLOW_COPY_AND_ASSIGN(VersionLoader); | 109 DISALLOW_COPY_AND_ASSIGN(VersionLoader); |
112 }; | 110 }; |
113 | 111 |
114 } // namespace chromeos | 112 } // namespace chromeos |
115 | 113 |
116 #endif // CHROME_BROWSER_CHROMEOS_VERSION_LOADER_H_ | 114 #endif // CHROME_BROWSER_CHROMEOS_VERSION_LOADER_H_ |
OLD | NEW |