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

Unified Diff: components/update_client/component_patcher_operation.h

Issue 2873513002: Fix dependencies on OutOfProcessPatcher. (Closed)
Patch Set: base namespace fix Created 3 years, 7 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 | « components/update_client/component.cc ('k') | components/update_client/component_patcher_operation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/component_patcher_operation.h
diff --git a/components/update_client/component_patcher_operation.h b/components/update_client/component_patcher_operation.h
index aaf09c7b7939ac094ef2af8a8fe5bdbf45e5e369..08c55a1e295692b32fcc1edd0f471937758c3220 100644
--- a/components/update_client/component_patcher_operation.h
+++ b/components/update_client/component_patcher_operation.h
@@ -27,6 +27,7 @@ extern const char kInput[];
extern const char kPatch[];
class CrxInstaller;
+class OutOfProcessPatcher;
enum class UnpackerError;
class DeltaUpdateOp : public base::RefCountedThreadSafe<DeltaUpdateOp> {
@@ -126,24 +127,6 @@ class DeltaUpdateOpCreate : public DeltaUpdateOp {
DISALLOW_COPY_AND_ASSIGN(DeltaUpdateOpCreate);
};
-// An interface an embedder may fulfill to enable out-of-process patching.
-class OutOfProcessPatcher
- : public base::RefCountedThreadSafe<OutOfProcessPatcher> {
- public:
- virtual void Patch(
- const std::string& operation,
- scoped_refptr<base::SequencedTaskRunner> task_runner,
- const base::FilePath& input_abs_path,
- const base::FilePath& patch_abs_path,
- const base::FilePath& output_abs_path,
- base::Callback<void(int result)> callback) = 0;
-
- protected:
- friend class base::RefCountedThreadSafe<OutOfProcessPatcher>;
-
- virtual ~OutOfProcessPatcher() {}
-};
-
// Both 'bsdiff' and 'courgette' operations take an existing file on disk,
// and a bsdiff- or Courgette-format patch file provided in the delta update
// package, and run bsdiff or Courgette to construct an output file in the
@@ -151,8 +134,9 @@ class OutOfProcessPatcher
class DeltaUpdateOpPatch : public DeltaUpdateOp {
public:
// |out_of_process_patcher| may be NULL.
- DeltaUpdateOpPatch(const std::string& operation,
- scoped_refptr<OutOfProcessPatcher> out_of_process_patcher);
+ DeltaUpdateOpPatch(
+ const std::string& operation,
+ const scoped_refptr<OutOfProcessPatcher>& out_of_process_patcher);
private:
~DeltaUpdateOpPatch() override;
@@ -170,7 +154,7 @@ class DeltaUpdateOpPatch : public DeltaUpdateOp {
void DonePatching(const ComponentPatcher::Callback& callback, int result);
std::string operation_;
- scoped_refptr<OutOfProcessPatcher> out_of_process_patcher_;
+ const scoped_refptr<OutOfProcessPatcher> out_of_process_patcher_;
base::FilePath patch_abs_path_;
base::FilePath input_abs_path_;
« no previous file with comments | « components/update_client/component.cc ('k') | components/update_client/component_patcher_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698