Index: chrome/browser/component_updater/component_patcher.cc |
diff --git a/chrome/browser/component_updater/component_patcher.cc b/chrome/browser/component_updater/component_patcher.cc |
index 223bca817f4be9097c6fd7f7818e92d76bf45cdd..60a324b2cc972142393245e0ee2db9d4af6dc48c 100644 |
--- a/chrome/browser/component_updater/component_patcher.cc |
+++ b/chrome/browser/component_updater/component_patcher.cc |
@@ -44,12 +44,12 @@ ComponentPatcher::ComponentPatcher( |
const base::FilePath& input_dir, |
const base::FilePath& unpack_dir, |
ComponentInstaller* installer, |
- bool in_process, |
+ DeltaUpdateOpFactory* delta_update_op_factory, |
scoped_refptr<base::SequencedTaskRunner> task_runner) |
: input_dir_(input_dir), |
unpack_dir_(unpack_dir), |
installer_(installer), |
- in_process_(in_process), |
+ delta_update_op_factory_(delta_update_op_factory), |
task_runner_(task_runner) { |
} |
@@ -84,7 +84,13 @@ void ComponentPatcher::PatchNextFile() { |
} |
const base::DictionaryValue* command_args = |
static_cast<base::DictionaryValue*>(*next_command_); |
- current_operation_ = CreateDeltaUpdateOp(*command_args); |
+ |
+ std::string operation; |
+ if (command_args->GetString(kOp, &operation)) { |
+ current_operation_ = |
+ delta_update_op_factory_->CreateDeltaUpdateOp(operation); |
+ } |
+ |
if (!current_operation_) { |
DonePatching(ComponentUnpacker::kDeltaUnsupportedCommand, 0); |
return; |
@@ -93,7 +99,6 @@ void ComponentPatcher::PatchNextFile() { |
input_dir_, |
unpack_dir_, |
installer_, |
- in_process_, |
base::Bind(&ComponentPatcher::DonePatchingFile, |
scoped_refptr<ComponentPatcher>(this)), |
task_runner_); |