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

Unified Diff: chrome/utility/chrome_content_utility_client.cc

Issue 2747123004: Out-of-process file patcher: DCHECK the files in the utility process (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/chrome_content_utility_client.cc
diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc
index 1e013333a9f040790e9720625fb07334929f33e4..58eeb6269b075b2182667140124ffeeba4a449ba 100644
--- a/chrome/utility/chrome_content_utility_client.cc
+++ b/chrome/utility/chrome_content_utility_client.cc
@@ -84,6 +84,10 @@ class FilePatcherImpl : public chrome::mojom::FilePatcher {
base::File patch_file,
base::File output_file,
const PatchFileBsdiffCallback& callback) override {
+ DCHECK(input_file.IsValid());
+ DCHECK(patch_file.IsValid());
+ DCHECK(output_file.IsValid());
+
const int patch_result_status = bsdiff::ApplyBinaryPatch(
std::move(input_file), std::move(patch_file), std::move(output_file));
callback.Run(patch_result_status);
@@ -93,6 +97,10 @@ class FilePatcherImpl : public chrome::mojom::FilePatcher {
base::File patch_file,
base::File output_file,
const PatchFileCourgetteCallback& callback) override {
+ DCHECK(input_file.IsValid());
+ DCHECK(patch_file.IsValid());
+ DCHECK(output_file.IsValid());
+
const int patch_result_status = courgette::ApplyEnsemblePatch(
std::move(input_file), std::move(patch_file), std::move(output_file));
callback.Run(patch_result_status);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698