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

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

Issue 25883006: Support asynchronous patching operations in the component updater. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tests
Patch Set: Threading model changes. Created 7 years, 1 month 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_patcher.h
diff --git a/chrome/browser/component_updater/component_patcher.h b/chrome/browser/component_updater/component_patcher.h
index 1990922dac9c3d024d6eb65c14f83609b503355b..215ea717ed9c2ef4a475d1ac72a3dee3389b594c 100644
--- a/chrome/browser/component_updater/component_patcher.h
+++ b/chrome/browser/component_updater/component_patcher.h
@@ -51,7 +51,7 @@ class ComponentPatcher {
kPatchTypeBsdiff,
};
- virtual ComponentUnpacker::Error Patch(PatchType patch_type,
+ virtual component_updater::Error Patch(PatchType patch_type,
Sorin Jianu 2013/11/21 19:48:37 it would be nice to define what we can inside the
waffles 2013/11/26 00:46:55 Done.
const base::FilePath& input_file,
const base::FilePath& patch_file,
const base::FilePath& output_file,
@@ -62,7 +62,7 @@ class ComponentPatcher {
class ComponentPatcherCrossPlatform : public ComponentPatcher {
public:
ComponentPatcherCrossPlatform();
- virtual ComponentUnpacker::Error Patch(PatchType patch_type,
+ virtual component_updater::Error Patch(PatchType patch_type,
const base::FilePath& input_file,
const base::FilePath& patch_file,
const base::FilePath& output_file,
@@ -75,12 +75,13 @@ 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(component_updater::Error, int)> callback);
#endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_PATCHER_H_

Powered by Google App Engine
This is Rietveld 408576698