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