chromium/components/services/patch/public/mojom/file_patcher.mojom

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module patch.mojom;

import "mojo/public/mojom/base/file.mojom";
import "mojo/public/mojom/base/read_only_file.mojom";
import "sandbox/policy/mojom/sandbox.mojom";

// Interface to the out-of-process file patcher. The file patcher runs
// utilities to apply a differential patch to a file, often for the purposes of
// software updates.
[ServiceSandbox=sandbox.mojom.Sandbox.kService]
interface FilePatcher {
  // Patch |input_file_path| with |patch_file_path| using the Puffin PuffPatch
  // algorithm and place the output in |output_file_path|.
  // Returns |result| puffin::Status::P_OK on success.
  PatchFilePuffPatch(
      mojo_base.mojom.ReadOnlyFile input_file,
      mojo_base.mojom.ReadOnlyFile patch_file,
      mojo_base.mojom.File output_file) => (int32 result);
};