diff options
author | sorin <sorin@chromium.org> | 2015-05-26 12:59:09 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-26 20:00:01 +0000 |
commit | 7c7176234e553c35a2d8ec014f2caa29f7278065 (patch) | |
tree | 70eb3c58c82369cc13c939c17ae63344644c4b31 /components/component_updater/default_component_installer.cc | |
parent | 92780e77b6e0755e1d4bacbd493032969d04293b (diff) | |
download | chromium_src-7c7176234e553c35a2d8ec014f2caa29f7278065.zip chromium_src-7c7176234e553c35a2d8ec014f2caa29f7278065.tar.gz chromium_src-7c7176234e553c35a2d8ec014f2caa29f7278065.tar.bz2 |
Rewrite component update service in terms of components/update_client.
The goal of this change is to re-implement the component updater by
reusing the common code in components/update_client while keeping
the its public interface the same as before, in order to minimize
changes in its existing clients.
BUG=450337
Review URL: https://codereview.chromium.org/1133443002
Cr-Commit-Position: refs/heads/master@{#331412}
Diffstat (limited to 'components/component_updater/default_component_installer.cc')
-rw-r--r-- | components/component_updater/default_component_installer.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/components/component_updater/default_component_installer.cc b/components/component_updater/default_component_installer.cc index 36844fb..56f5ca1 100644 --- a/components/component_updater/default_component_installer.cc +++ b/components/component_updater/default_component_installer.cc @@ -82,8 +82,6 @@ bool DefaultComponentInstaller::InstallHelper( bool DefaultComponentInstaller::Install(const base::DictionaryValue& manifest, const base::FilePath& unpack_path) { - DCHECK(task_runner_->RunsTasksOnCurrentThread()); - std::string manifest_version; manifest.GetStringASCII("version", &manifest_version); base::Version version(manifest_version.c_str()); @@ -127,6 +125,7 @@ bool DefaultComponentInstaller::GetInstalledFile( } bool DefaultComponentInstaller::Uninstall() { + DCHECK(thread_checker_.CalledOnValidThread()); task_runner_->PostTask( FROM_HERE, base::Bind(&DefaultComponentInstaller::UninstallOnTaskRunner, this)); @@ -248,9 +247,7 @@ void DefaultComponentInstaller::FinishRegistration( crx.version = current_version_; crx.fingerprint = current_fingerprint_; installer_traits_->GetHash(&crx.pk_hash); - ComponentUpdateService::Status status = cus->RegisterComponent(crx); - if (status != ComponentUpdateService::Status::kOk && - status != ComponentUpdateService::Status::kReplaced) { + if (!cus->RegisterComponent(crx)) { NOTREACHED() << "Component registration failed for " << installer_traits_->GetName(); return; |