OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 COMPONENTS_UPDATE_CLIENT_OUT_OF_PROCESS_PATCHER_H_ |
| 6 #define COMPONENTS_UPDATE_CLIENT_OUT_OF_PROCESS_PATCHER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/callback_forward.h" |
| 11 #include "base/memory/ref_counted.h" |
| 12 |
| 13 namespace base { |
| 14 class FilePath; |
| 15 class SequencedTaskRunner; |
| 16 } |
| 17 |
| 18 namespace update_client { |
| 19 |
| 20 // An interface an embedder can implement to enable out-of-process patching. |
| 21 class OutOfProcessPatcher |
| 22 : public base::RefCountedThreadSafe<OutOfProcessPatcher> { |
| 23 public: |
| 24 virtual void Patch( |
| 25 const std::string& operation, |
| 26 const scoped_refptr<base::SequencedTaskRunner>& task_runner, |
| 27 const base::FilePath& input_abs_path, |
| 28 const base::FilePath& patch_abs_path, |
| 29 const base::FilePath& output_abs_path, |
| 30 const base::Callback<void(int result)>& callback) = 0; |
| 31 |
| 32 protected: |
| 33 friend class base::RefCountedThreadSafe<OutOfProcessPatcher>; |
| 34 |
| 35 virtual ~OutOfProcessPatcher() {} |
| 36 }; |
| 37 |
| 38 } // namespace update_client |
| 39 |
| 40 #endif // COMPONENTS_UPDATE_CLIENT_OUT_OF_PROCESS_PATCHER_H_ |
OLD | NEW |