| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_WIN_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_WIN_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/string16.h" |
| 12 #include "chrome/browser/google/google_update.h" |
| 13 #include "chrome/browser/ui/webui/help/version_updater.h" |
| 14 |
| 15 class VersionUpdaterWin : public VersionUpdater, |
| 16 public GoogleUpdateStatusListener { |
| 17 protected: |
| 18 friend class VersionUpdater; |
| 19 |
| 20 // Clients must use VersionUpdater::Create(). |
| 21 VersionUpdaterWin(); |
| 22 virtual ~VersionUpdaterWin(); |
| 23 |
| 24 private: |
| 25 // VersionUpdater implementation. |
| 26 virtual void CheckForUpdate(const StatusCallback& callback) OVERRIDE; |
| 27 virtual void RelaunchBrowser() const OVERRIDE; |
| 28 |
| 29 // GoogleUpdateStatusListener implementation. |
| 30 virtual void OnReportResults(GoogleUpdateUpgradeResult result, |
| 31 GoogleUpdateErrorCode error_code, |
| 32 const string16& error_message, |
| 33 const string16& version) OVERRIDE; |
| 34 |
| 35 // Update the UI to show the status of the upgrade. |
| 36 void UpdateStatus(GoogleUpdateUpgradeResult result, |
| 37 GoogleUpdateErrorCode error_code, |
| 38 const string16& error_message); |
| 39 |
| 40 // The class that communicates with Google Update to find out if an update is |
| 41 // available and asks it to start an upgrade. |
| 42 scoped_refptr<GoogleUpdate> google_updater_; |
| 43 |
| 44 // Callback used to communicate update status to the client. |
| 45 StatusCallback callback_; |
| 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(VersionUpdaterWin); |
| 48 }; |
| 49 |
| 50 #endif // CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_WIN_H_ |
| OLD | NEW |