| Index: chrome/browser/chromeos/cros/update_library.cc
|
| diff --git a/chrome/browser/chromeos/cros/update_library.cc b/chrome/browser/chromeos/cros/update_library.cc
|
| index 80a4b96734452686530e2768afe4d5be47c5f006..e7992b18943b8a58f288a4b95d131760cd415b6f 100644
|
| --- a/chrome/browser/chromeos/cros/update_library.cc
|
| +++ b/chrome/browser/chromeos/cros/update_library.cc
|
| @@ -36,11 +36,14 @@ class UpdateLibraryImpl : public UpdateLibrary {
|
| observers_.RemoveObserver(observer);
|
| }
|
|
|
| - bool CheckForUpdate() {
|
| - if (!CrosLibrary::Get()->EnsureLoaded())
|
| - return false;
|
| + void CheckForUpdate() {
|
| + if (CrosLibrary::Get()->EnsureLoaded())
|
| + RequestUpdateCheck(NULL, NULL);
|
| + }
|
|
|
| - return InitiateUpdateCheck();
|
| + void RequestUpdate(chromeos::UpdateCallback callback, void* user_data) {
|
| + if (CrosLibrary::Get()->EnsureLoaded())
|
| + RequestUpdateCheck(callback, user_data);
|
| }
|
|
|
| bool RebootAfterUpdate() {
|
| @@ -119,7 +122,11 @@ class UpdateLibraryStubImpl : public UpdateLibrary {
|
| ~UpdateLibraryStubImpl() {}
|
| void AddObserver(Observer* observer) {}
|
| void RemoveObserver(Observer* observer) {}
|
| - bool CheckForUpdate() { return false; }
|
| + void CheckForUpdate() {}
|
| + void RequestUpdate(chromeos::UpdateCallback callback, void* user_data) {
|
| + if (callback)
|
| + callback(user_data, UPDATE_RESULT_FAILED, "stub update");
|
| + }
|
| bool RebootAfterUpdate() { return false; }
|
| bool SetReleaseTrack(const std::string& track) { return false; }
|
| std::string GetReleaseTrack() { return "beta-channel"; }
|
|
|