Index: chrome/browser/ui/webui/help/version_updater_win.h |
diff --git a/chrome/browser/ui/webui/help/version_updater_win.h b/chrome/browser/ui/webui/help/version_updater_win.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..caa27ca9be6b946f647b1d3e12566a37c309970d |
--- /dev/null |
+++ b/chrome/browser/ui/webui/help/version_updater_win.h |
@@ -0,0 +1,60 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_WIN_H_ |
+#define CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_WIN_H_ |
+#pragma once |
+ |
+#include "base/memory/ref_counted.h" |
+#include "base/memory/weak_ptr.h" |
+#include "base/string16.h" |
+#include "chrome/browser/google/google_update.h" |
+#include "chrome/browser/ui/webui/help/version_updater.h" |
+ |
+class Version; |
+ |
+class VersionUpdaterWin : public VersionUpdater, |
+ public GoogleUpdateStatusListener { |
+ public: |
+ // Got the intalled version so we can complete the handling of the |
+ // UPGRADE_ALREADY_UP_TO_DATE result case. |
+ void GotInstalledVersion(Version* version); |
Roger Tawa OOO till Jul 10th
2012/07/05 16:13:22
Could make this method private by declaring the Ve
MAD
2012/07/05 20:50:41
Yeah, I was hesitating... I was wondering which on
|
+ |
+ protected: |
+ friend class VersionUpdater; |
Roger Tawa OOO till Jul 10th
2012/07/05 16:13:22
do friends go in the private section?
MAD
2012/07/05 20:50:41
Done.
|
+ |
+ // Clients must use VersionUpdater::Create(). |
+ VersionUpdaterWin(); |
+ virtual ~VersionUpdaterWin(); |
+ |
+ private: |
+ // VersionUpdater implementation. |
+ virtual void CheckForUpdate(const StatusCallback& callback) OVERRIDE; |
+ virtual void RelaunchBrowser() const OVERRIDE; |
+ |
+ // GoogleUpdateStatusListener implementation. |
+ virtual void OnReportResults(GoogleUpdateUpgradeResult result, |
+ GoogleUpdateErrorCode error_code, |
+ const string16& error_message, |
+ const string16& version) OVERRIDE; |
+ |
+ // Update the UI to show the status of the upgrade. |
+ void UpdateStatus(GoogleUpdateUpgradeResult result, |
+ GoogleUpdateErrorCode error_code, |
+ const string16& error_message); |
+ |
+ // The class that communicates with Google Update to find out if an update is |
+ // available and asks it to start an upgrade. |
+ scoped_refptr<GoogleUpdate> google_updater_; |
+ |
+ // Used for callbacks. |
+ base::WeakPtrFactory<VersionUpdaterWin> weak_factory_; |
+ |
+ // Callback used to communicate update status to the client. |
+ StatusCallback callback_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(VersionUpdaterWin); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_WIN_H_ |