From 592468b9ed9ca80c4adde4e20fe28168161e6980 Mon Sep 17 00:00:00 2001 From: "davemoore@chromium.org" Date: Wed, 10 Feb 2010 23:08:47 +0000 Subject: 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 --- chrome/browser/google_update.h | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'chrome/browser/google_update.h') 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 { // 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; 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 { 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); }; -- cgit v1.1