Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_PATCHER_OPERATION_OUT_OF_PROC ESS_H_ | 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_PATCHER_OPERATION_OUT_OF_PROC ESS_H_ |
| 6 #define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_PATCHER_OPERATION_OUT_OF_PROC ESS_H_ | 6 #define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_PATCHER_OPERATION_OUT_OF_PROC ESS_H_ |
| 7 | 7 |
| 8 #include <string> | |
|
Sam McNally
2016/12/22 02:45:49
These are still needed.
Noel Gordon
2016/12/22 05:06:33
OK, let's do IWYU herein, and remove duplicate #in
| |
| 9 | |
| 10 #include "base/callback_forward.h" | |
| 11 #include "base/macros.h" | 8 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 9 #include "chrome/common/file_patcher.mojom.h" |
| 13 #include "components/update_client/component_patcher_operation.h" | 10 #include "components/update_client/component_patcher_operation.h" |
| 14 | 11 #include "content/public/browser/utility_process_mojo_client.h" |
| 15 namespace base { | |
| 16 class FilePath; | |
|
Sam McNally
2016/12/22 02:45:49
So are these.
Noel Gordon
2016/12/22 05:06:33
Ditto.
| |
| 17 class SequencedTaskRunner; | |
| 18 } // namespace base | |
| 19 | 12 |
| 20 namespace component_updater { | 13 namespace component_updater { |
| 21 | 14 |
| 22 class PatchHost; | |
| 23 | |
| 24 // Implements the DeltaUpdateOpPatch out-of-process patching. | 15 // Implements the DeltaUpdateOpPatch out-of-process patching. |
| 25 class ChromeOutOfProcessPatcher : public update_client::OutOfProcessPatcher { | 16 class ChromeOutOfProcessPatcher : public update_client::OutOfProcessPatcher { |
| 26 public: | 17 public: |
| 27 ChromeOutOfProcessPatcher(); | 18 ChromeOutOfProcessPatcher(); |
| 28 | 19 |
| 29 // DeltaUpdateOpPatch::OutOfProcessPatcher implementation. | 20 // DeltaUpdateOpPatch::OutOfProcessPatcher::Patch() request. |
|
Sam McNally
2016/12/22 02:45:49
This comment should be something of the form updat
Noel Gordon
2016/12/22 05:06:33
// update_client::OutOfProcessPatcher
done.
| |
| 30 void Patch(const std::string& operation, | 21 void Patch(const std::string& operation, |
| 31 scoped_refptr<base::SequencedTaskRunner> task_runner, | 22 scoped_refptr<base::SequencedTaskRunner> task_runner, |
| 32 const base::FilePath& input_abs_path, | 23 const base::FilePath& input_abs_path, |
| 33 const base::FilePath& patch_abs_path, | 24 const base::FilePath& patch_abs_path, |
| 34 const base::FilePath& output_abs_path, | 25 const base::FilePath& output_abs_path, |
| 35 base::Callback<void(int result)> callback) override; | 26 base::Callback<void(int result)> callback) override; |
| 36 | 27 |
| 37 private: | 28 private: |
| 38 ~ChromeOutOfProcessPatcher() override; | 29 ~ChromeOutOfProcessPatcher() override; |
| 39 | 30 |
| 40 scoped_refptr<PatchHost> host_; | 31 // Patch() request operation result. |
| 32 void PatchDone(int result); | |
| 33 | |
| 34 // Used to signal the operation result back to the Patch() requester. | |
| 35 scoped_refptr<base::SequencedTaskRunner> task_runner_; | |
| 36 base::Callback<void(int result)> callback_; | |
| 37 | |
| 38 // Utility process used for out-of-process file patching. | |
| 39 std::unique_ptr<content::UtilityProcessMojoClient<chrome::mojom::FilePatcher>> | |
| 40 utility_process_mojo_client_; | |
| 41 | 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(ChromeOutOfProcessPatcher); | 42 DISALLOW_COPY_AND_ASSIGN(ChromeOutOfProcessPatcher); |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 } // namespace component_updater | 45 } // namespace component_updater |
| 46 | 46 |
| 47 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_PATCHER_OPERATION_OUT_OF_P ROCESS_H_ | 47 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_PATCHER_OPERATION_OUT_OF_P ROCESS_H_ |
| OLD | NEW |