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 |