Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: chrome/browser/chromeos/cros/update_library.h

Issue 6648009: Modify UpdateLibrary to use async RequestUpdateCheck call (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 virtual void UpdateStatusChanged(UpdateLibrary* library) = 0; 56 virtual void UpdateStatusChanged(UpdateLibrary* library) = 0;
57 }; 57 };
58 58
59 // static UpdateLibrary* GetStubImplementation(); 59 // static UpdateLibrary* GetStubImplementation();
60 60
61 virtual ~UpdateLibrary() {} 61 virtual ~UpdateLibrary() {}
62 virtual void AddObserver(Observer* observer) = 0; 62 virtual void AddObserver(Observer* observer) = 0;
63 virtual void RemoveObserver(Observer* observer) = 0; 63 virtual void RemoveObserver(Observer* observer) = 0;
64 64
65 // Initiates update check and returns true if check was initiated. 65 // Initiates update check and returns true if check was initiated.
66 virtual bool CheckForUpdate() = 0; 66 virtual void CheckForUpdate() = 0;
altimofeev 2011/03/09 10:42:27 Please, fix the comment. Also, consider deprecatin
stevenjb 2011/03/10 01:23:16 Removed.
67
68 // Request an update check and call |callback| when the request has completed.
69 virtual void RequestUpdate(chromeos::UpdateCallback callback,
altimofeev 2011/03/09 10:42:27 Why don't use RequestUpdateCheck for the consisten
stevenjb 2011/03/10 01:23:16 Sure. Done.
70 void* user_data) = 0;
67 71
68 // Reboots if update has been performed. 72 // Reboots if update has been performed.
69 virtual bool RebootAfterUpdate() = 0; 73 virtual bool RebootAfterUpdate() = 0;
70 74
71 // Sets the release track (channel). |track| should look like 75 // Sets the release track (channel). |track| should look like
72 // "beta-channel" and "dev-channel". Returns true on success. 76 // "beta-channel" and "dev-channel". Returns true on success.
73 virtual bool SetReleaseTrack(const std::string& track) = 0; 77 virtual bool SetReleaseTrack(const std::string& track) = 0;
74 78
75 // Returns the release track (channel). On error, returns an empty 79 // Returns the release track (channel). On error, returns an empty
76 // string. 80 // string.
77 virtual std::string GetReleaseTrack() = 0; 81 virtual std::string GetReleaseTrack() = 0;
78 82
79 virtual const Status& status() const = 0; 83 virtual const Status& status() const = 0;
80 84
81 // Factory function, creates a new instance and returns ownership. 85 // Factory function, creates a new instance and returns ownership.
82 // For normal usage, access the singleton via CrosLibrary::Get(). 86 // For normal usage, access the singleton via CrosLibrary::Get().
83 static UpdateLibrary* GetImpl(bool stub); 87 static UpdateLibrary* GetImpl(bool stub);
84 }; 88 };
85 89
86 } // namespace chromeos 90 } // namespace chromeos
87 91
88 #endif // CHROME_BROWSER_CHROMEOS_CROS_UPDATE_LIBRARY_H_ 92 #endif // CHROME_BROWSER_CHROMEOS_CROS_UPDATE_LIBRARY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698