| Index: chrome/browser/component_updater/component_updater_service.cc
|
| diff --git a/chrome/browser/component_updater/component_updater_service.cc b/chrome/browser/component_updater/component_updater_service.cc
|
| index 903674a15409ab26adcd249e7c6f06c886e10402..fa04986f6829511953201f2f4fcabcf416b4cc2b 100644
|
| --- a/chrome/browser/component_updater/component_updater_service.cc
|
| +++ b/chrome/browser/component_updater/component_updater_service.cc
|
| @@ -21,6 +21,7 @@
|
| #include "base/threading/sequenced_worker_pool.h"
|
| #include "base/timer/timer.h"
|
| #include "chrome/browser/browser_process.h"
|
| +#include "chrome/browser/component_updater/component_patcher.h"
|
| #include "chrome/browser/component_updater/component_unpacker.h"
|
| #include "chrome/browser/component_updater/component_updater_ping_manager.h"
|
| #include "chrome/browser/component_updater/component_updater_utils.h"
|
| @@ -251,11 +252,13 @@
|
|
|
| scoped_ptr<ComponentUpdateService::Configurator> config_;
|
|
|
| + scoped_ptr<ComponentPatcher> component_patcher_;
|
| +
|
| scoped_ptr<UpdateChecker> update_checker_;
|
|
|
| scoped_ptr<PingManager> ping_manager_;
|
|
|
| - scoped_refptr<ComponentUnpacker> unpacker_;
|
| + scoped_ptr<ComponentUnpacker> unpacker_;
|
|
|
| scoped_ptr<CrxDownloader> crx_downloader_;
|
|
|
| @@ -278,6 +281,7 @@
|
|
|
| CrxUpdateService::CrxUpdateService(ComponentUpdateService::Configurator* config)
|
| : config_(config),
|
| + component_patcher_(config->CreateComponentPatcher()),
|
| ping_manager_(new PingManager(config->PingUrl(),
|
| config->RequestContext())),
|
| blocking_task_runner_(BrowserThread::GetBlockingPool()->
|
| @@ -852,12 +856,12 @@
|
| void CrxUpdateService::Install(scoped_ptr<CRXContext> context,
|
| const base::FilePath& crx_path) {
|
| // This function owns the file at |crx_path| and the |context| object.
|
| - unpacker_ = new ComponentUnpacker(context->pk_hash,
|
| - crx_path,
|
| - context->fingerprint,
|
| - context->installer,
|
| - config_->InProcess(),
|
| - blocking_task_runner_);
|
| + unpacker_.reset(new ComponentUnpacker(context->pk_hash,
|
| + crx_path,
|
| + context->fingerprint,
|
| + component_patcher_.get(),
|
| + context->installer,
|
| + blocking_task_runner_));
|
| unpacker_->Unpack(base::Bind(&CrxUpdateService::EndUnpacking,
|
| base::Unretained(this),
|
| context->id,
|
| @@ -876,8 +880,6 @@
|
| base::Bind(&CrxUpdateService::DoneInstalling, base::Unretained(this),
|
| component_id, error, extended_error),
|
| base::TimeDelta::FromMilliseconds(config_->StepDelay()));
|
| - // Reset the unpacker last, otherwise we free our own arguments.
|
| - unpacker_ = NULL;
|
| }
|
|
|
| // Installation has been completed. Adjust the component status and
|
|
|