diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-10 23:08:47 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-10 23:08:47 +0000 |
commit | 592468b9ed9ca80c4adde4e20fe28168161e6980 (patch) | |
tree | 98edc181b34a14d122a1d3966f5b250ab688c37a /chrome/browser/google_update.h | |
parent | 74fd94cc8b76c4b90eee88b03ab7b50f0f1c1903 (diff) | |
download | chromium_src-592468b9ed9ca80c4adde4e20fe28168161e6980.zip chromium_src-592468b9ed9ca80c4adde4e20fe28168161e6980.tar.gz chromium_src-592468b9ed9ca80c4adde4e20fe28168161e6980.tar.bz2 |
Use Chrome update UI for Chrome OS updates.
BUG=279 (Chromium OS) (Not Complete)
TEST=none
Review URL: http://codereview.chromium.org/587006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38697 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/google_update.h')
-rw-r--r-- | chrome/browser/google_update.h | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/chrome/browser/google_update.h b/chrome/browser/google_update.h index b2b0961..b430a08 100644 --- a/chrome/browser/google_update.h +++ b/chrome/browser/google_update.h @@ -9,7 +9,9 @@ #include "base/basictypes.h" #include "base/ref_counted.h" +#if defined(OS_WIN) #include "google_update_idl.h" +#endif class MessageLoop; namespace views { @@ -91,16 +93,28 @@ class GoogleUpdate : public base::RefCountedThreadSafe<GoogleUpdate> { // be null. void CheckForUpdate(bool install_if_newer, views::Window* window); - // Adds/removes a listener to report status back to. Only one listener is - // maintained at the moment. - void AddStatusChangeListener(GoogleUpdateStatusListener* listener); - void RemoveStatusChangeListener(); + // Pass NULL to clear the listener + void set_status_listener(GoogleUpdateStatusListener* listener) { + listener_ = listener; + } private: friend class base::RefCountedThreadSafe<GoogleUpdate>; virtual ~GoogleUpdate(); +// The chromeos implementation is in browser/chromeos/google_update.cpp + +#if defined(OS_WIN) + + // This function reports failure from the Google Update operation to the + // listener. + // Note, after this function completes, this object will have deleted itself. + bool ReportFailure(HRESULT hr, GoogleUpdateErrorCode error_code, + MessageLoop* main_loop); + +#endif + // We need to run the update check on another thread than the main thread, and // therefore CheckForUpdate will delegate to this function. |main_loop| points // to the message loop that we want the response to come from. @@ -116,19 +130,13 @@ class GoogleUpdate : public base::RefCountedThreadSafe<GoogleUpdate> { void ReportResults(GoogleUpdateUpgradeResult results, GoogleUpdateErrorCode error_code); - // This function reports failure from the Google Update operation to the - // listener. - // Note, after this function completes, this object will have deleted itself. - bool ReportFailure(HRESULT hr, GoogleUpdateErrorCode error_code, - MessageLoop* main_loop); - - // The listener who is interested in finding out the result of the operation. - GoogleUpdateStatusListener* listener_; - // Which version string Google Update found (if a new one was available). // Otherwise, this will be blank. std::wstring version_available_; + // The listener who is interested in finding out the result of the operation. + GoogleUpdateStatusListener* listener_; + DISALLOW_EVIL_CONSTRUCTORS(GoogleUpdate); }; |