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

Unified Diff: chrome/browser/component_updater/component_updater_service.h

Issue 321473003: Elevated install of recovery component (component update part) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial upload Created 6 years, 6 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/component_updater/component_updater_service.h
diff --git a/chrome/browser/component_updater/component_updater_service.h b/chrome/browser/component_updater/component_updater_service.h
index 35d4b3aa856bed09fbaf4f8f87123c983d4f31e7..a67ef7d0ec7ecbd07fe99ea29f150c127eced966 100644
--- a/chrome/browser/component_updater/component_updater_service.h
+++ b/chrome/browser/component_updater/component_updater_service.h
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "base/callback.h"
#include "base/version.h"
#include "url/gurl.h"
@@ -31,6 +32,8 @@ namespace component_updater {
class OnDemandUpdater;
+typedef base::Callback<bool(const base::FilePath&)> InstallerSourceSerializer;
+
// Component specific installers must derive from this class and implement
// OnUpdateError() and Install(). A valid instance of this class must be
// given to ComponentUpdateService::RegisterComponent().
@@ -48,6 +51,11 @@ class ComponentInstaller {
virtual bool Install(const base::DictionaryValue& manifest,
const base::FilePath& unpack_path) = 0;
+ // Called by the component updater if Install() retuns false. This gives
+ // installer a chance to handle install failure. |serializer| knows how to
+ // save installer source information to the given path for retry later.
+ virtual void OnInstallError(const InstallerSourceSerializer& serializer) = 0;
+
// Set |installed_file| to the full path to the installed |file|. |file| is
// the filename of the file in this component's CRX. Returns false if this is
// not possible (the file has been removed or modified, or its current
« no previous file with comments | « chrome/browser/component_updater/component_unpacker.cc ('k') | chrome/browser/component_updater/default_component_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698