| Index: chrome/browser/component_updater/component_patcher.h
|
| diff --git a/chrome/browser/component_updater/component_patcher.h b/chrome/browser/component_updater/component_patcher.h
|
| index d972d1888166ad838c59f8ba9d75a006afe200b4..24e3f166a283f569e53775c70a65d853ce5560e1 100644
|
| --- a/chrome/browser/component_updater/component_patcher.h
|
| +++ b/chrome/browser/component_updater/component_patcher.h
|
| @@ -29,6 +29,7 @@
|
| #define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_PATCHER_H_
|
|
|
| #include "base/basictypes.h"
|
| +#include "base/callback_forward.h"
|
| #include "base/compiler_specific.h"
|
| #include "chrome/browser/component_updater/component_unpacker.h"
|
|
|
| @@ -53,22 +54,24 @@ class ComponentPatcher {
|
| kPatchTypeBsdiff,
|
| };
|
|
|
| - virtual ComponentUnpacker::Error Patch(PatchType patch_type,
|
| - const base::FilePath& input_file,
|
| - const base::FilePath& patch_file,
|
| - const base::FilePath& output_file,
|
| - int* error) = 0;
|
| + virtual ComponentUnpacker::Error Patch(
|
| + PatchType patch_type,
|
| + const base::FilePath& input_file,
|
| + const base::FilePath& patch_file,
|
| + const base::FilePath& output_file,
|
| + int* error) = 0;
|
| virtual ~ComponentPatcher() {}
|
| };
|
|
|
| class ComponentPatcherCrossPlatform : public ComponentPatcher {
|
| public:
|
| ComponentPatcherCrossPlatform();
|
| - virtual ComponentUnpacker::Error Patch(PatchType patch_type,
|
| - const base::FilePath& input_file,
|
| - const base::FilePath& patch_file,
|
| - const base::FilePath& output_file,
|
| - int* error) OVERRIDE;
|
| + virtual ComponentUnpacker::Error Patch(
|
| + PatchType patch_type,
|
| + const base::FilePath& input_file,
|
| + const base::FilePath& patch_file,
|
| + const base::FilePath& output_file,
|
| + int* error) OVERRIDE;
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(ComponentPatcherCrossPlatform);
|
| };
|
| @@ -77,13 +80,14 @@ class ComponentPatcherCrossPlatform : public ComponentPatcher {
|
| // component installer, and creates a new (non-differential) unpacked CRX, which
|
| // is then installed normally.
|
| // The non-differential files are written into the |unpack_dir| directory.
|
| -// Sets |error| to the error code of the first failing patch operation.
|
| -ComponentUnpacker::Error DifferentialUpdatePatch(
|
| +// When finished, calls the callback, passing error codes if any errors were
|
| +// encountered.
|
| +void DifferentialUpdatePatch(
|
| const base::FilePath& input_dir,
|
| const base::FilePath& unpack_dir,
|
| ComponentPatcher* component_patcher,
|
| ComponentInstaller* installer,
|
| - int* error);
|
| + base::Callback<void(ComponentUnpacker::Error, int)> callback);
|
|
|
| } // namespace component_updater
|
|
|
|
|