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

Unified Diff: courgette/courgette.h

Issue 2534873005: Sandbox the component updater's patcher utility process. (Closed)
Patch Set: Through #29 Created 4 years 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: courgette/courgette.h
diff --git a/courgette/courgette.h b/courgette/courgette.h
index 5f3dbb8367a81ba5f86f85ccd92399a3f7d7e9ac..29cf3c5749871b6069a2f85908989283862818ad 100644
--- a/courgette/courgette.h
+++ b/courgette/courgette.h
@@ -7,6 +7,7 @@
#include <stddef.h> // Required to define size_t on GCC
+#include "base/files/file.h"
#include "base/files/file_path.h"
namespace courgette {
@@ -74,6 +75,15 @@ class EncodedProgram;
Status ApplyEnsemblePatch(SourceStream* old, SourceStream* patch,
SinkStream* output);
+// Applies the patch in |patch_file| to the bytes in |old_file| and writes the
+// transformed ensemble to |new_file|.
+// Returns C_OK unless something went wrong.
+// This function first validates that the patch file has a proper header, so the
+// function can be used to 'try' a patch.
+Status ApplyEnsemblePatch(base::File old_file,
+ base::File patch_file,
+ base::File new_file);
+
// Applies the patch in |patch_file_name| to the bytes in |old_file_name| and
// writes the transformed ensemble to |new_file_name|.
// Returns C_OK unless something went wrong.

Powered by Google App Engine
This is Rietveld 408576698