Chromium Code Reviews| 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..25167e6d223084ff9756245de771c3c21ca5bc63 |
| --- /dev/null |
| +++ b/chrome/browser/ui/webui/help/version_updater_win.h |
| @@ -0,0 +1,50 @@ |
| +// 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/compiler_specific.h" |
| +#include "base/memory/ref_counted.h" |
| +#include "base/string16.h" |
| +#include "chrome/browser/google/google_update.h" |
| +#include "chrome/browser/ui/webui/help/version_updater.h" |
| + |
| +class VersionUpdaterWin : public VersionUpdater, |
| + public GoogleUpdateStatusListener { |
| + protected: |
| + friend class VersionUpdater; |
| + |
| + // 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_; |
|
Finnur
2012/03/16 12:03:22
I forget... if the name of the file includes _win.
|
| + |
| + // 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_ |