Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: chrome/browser/ui/webui/help/version_updater.h

Issue 9320056: Help: Implement the initial version of the cross-platform help/about page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: String fix. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/help/version_updater.h
diff --git a/chrome/browser/ui/webui/help/version_updater.h b/chrome/browser/ui/webui/help/version_updater.h
new file mode 100644
index 0000000000000000000000000000000000000000..9e63252d22b1d615a82667818d42bb2d749a5bc8
--- /dev/null
+++ b/chrome/browser/ui/webui/help/version_updater.h
@@ -0,0 +1,39 @@
+// 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_H_
+#define CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_H_
+#pragma once
+
+#include "base/callback.h"
+
+// Interface implemented to expose per-platform updating functionality.
+class VersionUpdater {
+ public:
+ // Update process state machine.
+ enum Status {
+ CHECKING,
+ UPDATING,
+ NEARLY_UPDATED,
+ UPDATED
+ };
+
+ // Used to update the client of status changes. int parameter is the progress
+ // and should only be non-zero for the UPDATING state.
+ typedef base::Callback<void(Status, int)> StatusCallback;
+
+ virtual ~VersionUpdater() {}
+
+ // Sub-classes must implement this method to create the respective
+ // specialization.
+ static VersionUpdater* Create();
+
+ // Begins the update process. |callback| is called for each status update.
+ virtual void CheckForUpdate(const StatusCallback& callback) = 0;
+
+ // Relaunches the browser, generally after being updated.
+ virtual void RelaunchBrowser() const = 0;
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_H_

Powered by Google App Engine
This is Rietveld 408576698