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

Unified Diff: chrome/browser/component_updater/component_unpacker.cc

Issue 25909005: Use UtilityProcessHost to patch files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nonblocking
Patch Set: Rebase to LKGR/248226 Created 6 years, 11 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
Index: chrome/browser/component_updater/component_unpacker.cc
diff --git a/chrome/browser/component_updater/component_unpacker.cc b/chrome/browser/component_updater/component_unpacker.cc
index 796b056f1232e983a9f24b99204655712937e290..d72ac215fed32ee6692e652c6352d97887d0fd55 100644
--- a/chrome/browser/component_updater/component_unpacker.cc
+++ b/chrome/browser/component_updater/component_unpacker.cc
@@ -98,15 +98,15 @@ ComponentUnpacker::ComponentUnpacker(
const std::vector<uint8>& pk_hash,
const base::FilePath& path,
const std::string& fingerprint,
- ComponentPatcher* patcher,
ComponentInstaller* installer,
+ bool in_process,
scoped_refptr<base::SequencedTaskRunner> task_runner)
: pk_hash_(pk_hash),
path_(path),
is_delta_(false),
fingerprint_(fingerprint),
- patcher_(patcher),
installer_(installer),
+ in_process_(in_process),
error_(kNone),
extended_error_(0),
ptr_factory_(this),
@@ -202,12 +202,14 @@ bool ComponentUnpacker::BeginPatching() {
error_ = kUnzipPathError;
return false;
}
+ patcher_.reset(new ComponentPatcher(unpack_diff_path_,
+ unpack_path_,
+ installer_,
+ in_process_,
+ task_runner_));
task_runner_->PostTask(
- FROM_HERE, base::Bind(&DifferentialUpdatePatch,
- unpack_diff_path_,
- unpack_path_,
- patcher_,
- installer_,
+ FROM_HERE, base::Bind(&ComponentPatcher::Start,
+ patcher_->GetWeakPtr(),
base::Bind(&ComponentUnpacker::EndPatching,
GetWeakPtr())));
} else {
@@ -221,6 +223,7 @@ bool ComponentUnpacker::BeginPatching() {
}
void ComponentUnpacker::EndPatching(Error error, int extended_error) {
+ patcher_.reset();
error_ = error;
extended_error_ = extended_error;
if (error_ != kNone) {

Powered by Google App Engine
This is Rietveld 408576698