diff options
author | sorin <sorin@chromium.org> | 2016-03-23 17:30:37 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-24 00:36:56 +0000 |
commit | 1a34fd0293910fcb86f7c4366b8bbb6a2e3e9b6d (patch) | |
tree | 7ccdec8d02760676fbb69dbc1be27387302f1df8 /components | |
parent | c27742238e78f1e2f7f6fe37f101eb0d07483416 (diff) | |
download | chromium_src-1a34fd0293910fcb86f7c4366b8bbb6a2e3e9b6d.zip chromium_src-1a34fd0293910fcb86f7c4366b8bbb6a2e3e9b6d.tar.gz chromium_src-1a34fd0293910fcb86f7c4366b8bbb6a2e3e9b6d.tar.bz2 |
Add some more logging to help diagnise component update issues.
Specifically, add more logging to CDM installer.
BUG=597289
Review URL: https://codereview.chromium.org/1830023002
Cr-Commit-Position: refs/heads/master@{#382988}
Diffstat (limited to 'components')
-rw-r--r-- | components/component_updater/default_component_installer.cc | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/components/component_updater/default_component_installer.cc b/components/component_updater/default_component_installer.cc index 659da95..b286e29 100644 --- a/components/component_updater/default_component_installer.cc +++ b/components/component_updater/default_component_installer.cc @@ -74,12 +74,22 @@ bool DefaultComponentInstaller::InstallHelper( const base::DictionaryValue& manifest, const base::FilePath& unpack_path, const base::FilePath& install_path) { - if (!base::Move(unpack_path, install_path)) + VLOG(1) << "InstallHelper: unpack_path=" << unpack_path.AsUTF8Unsafe() + << " install_path=" << install_path.AsUTF8Unsafe(); + + if (!base::Move(unpack_path, install_path)) { + PLOG(ERROR) << "Move failed."; return false; - if (!installer_traits_->OnCustomInstall(manifest, install_path)) + } + if (!installer_traits_->OnCustomInstall(manifest, install_path)) { + PLOG(ERROR) << "CustomInstall failed."; return false; - if (!installer_traits_->VerifyInstallation(manifest, install_path)) + } + if (!installer_traits_->VerifyInstallation(manifest, install_path)) { + PLOG(ERROR) << "VerifyInstallation failed."; return false; + } + return true; } @@ -88,6 +98,10 @@ bool DefaultComponentInstaller::Install(const base::DictionaryValue& manifest, std::string manifest_version; manifest.GetStringASCII("version", &manifest_version); base::Version version(manifest_version); + + VLOG(1) << "Install: version=" << version.GetString() + << " current version=" << current_version_.GetString(); + if (!version.IsValid()) return false; if (current_version_.CompareTo(version) > 0) @@ -140,9 +154,9 @@ void DefaultComponentInstaller::StartRegistration(ComponentUpdateService* cus) { DCHECK(task_runner_->RunsTasksOnCurrentThread()); base::FilePath base_dir = installer_traits_->GetBaseDirectory(); if (!base::PathExists(base_dir) && !base::CreateDirectory(base_dir)) { - NOTREACHED() << "Could not create the base directory for " - << installer_traits_->GetName() << " (" - << base_dir.MaybeAsASCII() << ")."; + PLOG(ERROR) << "Could not create the base directory for " + << installer_traits_->GetName() << " (" + << base_dir.MaybeAsASCII() << ")."; return; } @@ -173,9 +187,9 @@ void DefaultComponentInstaller::StartRegistration(ComponentUpdateService* cus) { scoped_ptr<base::DictionaryValue> manifest = update_client::ReadManifest(path); if (!manifest || !installer_traits_->VerifyInstallation(*manifest, path)) { - DLOG(ERROR) << "Failed to read manifest or verify installation for " - << installer_traits_->GetName() << " (" - << path.MaybeAsASCII() << ")."; + PLOG(ERROR) << "Failed to read manifest or verify installation for " + << installer_traits_->GetName() << " (" << path.MaybeAsASCII() + << ")."; older_paths.push_back(path); continue; } @@ -270,6 +284,7 @@ void DefaultComponentInstaller::FinishRegistration( void DefaultComponentInstaller::ComponentReady( scoped_ptr<base::DictionaryValue> manifest) { + VLOG(1) << "ComponentReady"; installer_traits_->ComponentReady(current_version_, GetInstallDirectory(), std::move(manifest)); } |