| 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_CROS_UPDATE_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_UPDATE_LIBRARY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_CROS_UPDATE_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_UPDATE_LIBRARY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 class Observer { | 48 class Observer { |
| 49 public: | 49 public: |
| 50 virtual ~Observer() {} | 50 virtual ~Observer() {} |
| 51 | 51 |
| 52 virtual void UpdateStatusChanged(UpdateLibrary* library) = 0; | 52 virtual void UpdateStatusChanged(UpdateLibrary* library) = 0; |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 virtual ~UpdateLibrary() {} | 55 virtual ~UpdateLibrary() {} |
| 56 | 56 |
| 57 virtual void Init() = 0; |
| 58 |
| 57 virtual void AddObserver(Observer* observer) = 0; | 59 virtual void AddObserver(Observer* observer) = 0; |
| 58 virtual void RemoveObserver(Observer* observer) = 0; | 60 virtual void RemoveObserver(Observer* observer) = 0; |
| 59 virtual bool HasObserver(Observer* observer) = 0; | 61 virtual bool HasObserver(Observer* observer) = 0; |
| 60 | 62 |
| 61 // Requests an update check and calls |callback| when completed. | 63 // Requests an update check and calls |callback| when completed. |
| 62 virtual void RequestUpdateCheck(chromeos::UpdateCallback callback, | 64 virtual void RequestUpdateCheck(chromeos::UpdateCallback callback, |
| 63 void* user_data) = 0; | 65 void* user_data) = 0; |
| 64 | 66 |
| 65 // Reboots if update has been performed. | 67 // Reboots if update has been performed. |
| 66 virtual bool RebootAfterUpdate() = 0; | 68 virtual bool RebootAfterUpdate() = 0; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 77 virtual const Status& status() const = 0; | 79 virtual const Status& status() const = 0; |
| 78 | 80 |
| 79 // Factory function, creates a new instance and returns ownership. | 81 // Factory function, creates a new instance and returns ownership. |
| 80 // For normal usage, access the singleton via CrosLibrary::Get(). | 82 // For normal usage, access the singleton via CrosLibrary::Get(). |
| 81 static UpdateLibrary* GetImpl(bool stub); | 83 static UpdateLibrary* GetImpl(bool stub); |
| 82 }; | 84 }; |
| 83 | 85 |
| 84 } // namespace chromeos | 86 } // namespace chromeos |
| 85 | 87 |
| 86 #endif // CHROME_BROWSER_CHROMEOS_CROS_UPDATE_LIBRARY_H_ | 88 #endif // CHROME_BROWSER_CHROMEOS_CROS_UPDATE_LIBRARY_H_ |
| OLD | NEW |