component_patcher_operation_out_of_process.h revision 03b57e008b61dfcb1fbad3aea950ae0e001748b0
1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_PATCHER_OPERATION_OUT_OF_PROCESS_H_
6#define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_PATCHER_OPERATION_OUT_OF_PROCESS_H_
7
8#include <string>
9
10#include "base/basictypes.h"
11#include "base/callback_forward.h"
12#include "components/component_updater/component_patcher_operation.h"
13
14namespace component_updater {
15
16class PatchHost;
17
18// Implements the DeltaUpdateOpPatch out-of-process patching.
19class ChromeOutOfProcessPatcher : public OutOfProcessPatcher {
20 public:
21  ChromeOutOfProcessPatcher();
22
23  // DeltaUpdateOpPatch::OutOfProcessPatcher implementation.
24  virtual void Patch(const std::string& operation,
25                     scoped_refptr<base::SequencedTaskRunner> task_runner,
26                     base::FilePath& input_abs_path,
27                     base::FilePath& patch_abs_path,
28                     base::FilePath& output_abs_path,
29                     base::Callback<void(int result)> callback) OVERRIDE;
30
31 private:
32  virtual ~ChromeOutOfProcessPatcher();
33
34  scoped_refptr<PatchHost> host_;
35
36  DISALLOW_COPY_AND_ASSIGN(ChromeOutOfProcessPatcher);
37};
38
39}  // namespace component_updater
40
41#endif  // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_PATCHER_OPERATION_OUT_OF_PROCESS_H_
42