Chromium Code Reviews| Index: components/component_updater/default_component_installer.cc |
| diff --git a/components/component_updater/default_component_installer.cc b/components/component_updater/default_component_installer.cc |
| index 094b34b3f8f91da131acb9cc43c54f18d3710751..94f7c76163dd577e550ddd61885beae07f88c568 100644 |
| --- a/components/component_updater/default_component_installer.cc |
| +++ b/components/component_updater/default_component_installer.cc |
| @@ -56,8 +56,8 @@ void DefaultComponentInstaller::Register( |
| task_runner_ = cus->GetSequencedTaskRunner(); |
| if (!installer_traits_) { |
| - NOTREACHED() << "A DefaultComponentInstaller has been created but " |
| - << "has no installer traits."; |
| + LOG(ERROR) << "A DefaultComponentInstaller has been created but " |
| + << "has no installer traits."; |
| return; |
| } |
| task_runner_->PostTaskAndReply( |
| @@ -69,7 +69,7 @@ void DefaultComponentInstaller::Register( |
| } |
| void DefaultComponentInstaller::OnUpdateError(int error) { |
| - NOTREACHED() << "Component update error: " << error; |
| + LOG(ERROR) << "Component update error: " << error; |
| } |
| bool DefaultComponentInstaller::InstallHelper( |
| @@ -152,50 +152,48 @@ bool DefaultComponentInstaller::Uninstall() { |
| return true; |
| } |
| -// TODO(xhwang): The following LOG(WARNING) messages are added to help |
| -// investigate http://crbug.com/614745. Remove redundant checks or convent them |
| -// to VLOG(1) after investigation is completed. |
| bool DefaultComponentInstaller::FindPreinstallation() { |
| base::FilePath path; |
| if (!PathService::Get(DIR_COMPONENT_PREINSTALLED, &path)) { |
| - LOG(WARNING) << "DIR_COMPONENT_PREINSTALLED does not exist."; |
| + DLOG(WARNING) << "DIR_COMPONENT_PREINSTALLED does not exist."; |
|
Sorin Jianu
2016/06/02 19:30:10
I've been using VLOG or DVLOG. My opinion is that
xhwang
2016/06/02 20:02:18
Done.
|
| return false; |
| } |
| path = path.Append(installer_traits_->GetRelativeInstallDir()); |
| if (!base::PathExists(path)) { |
| - LOG(WARNING) << "Relative install dir does not exist: " |
| - << path.MaybeAsASCII(); |
| + DLOG(WARNING) << "Relative install dir does not exist: " |
| + << path.MaybeAsASCII(); |
| return false; |
| } |
| std::unique_ptr<base::DictionaryValue> manifest = |
| update_client::ReadManifest(path); |
| if (!manifest) { |
| - LOG(WARNING) << "Manifest does not exist: " << path.MaybeAsASCII(); |
| + DLOG(WARNING) << "Manifest does not exist: " << path.MaybeAsASCII(); |
| return false; |
| } |
| if (!installer_traits_->VerifyInstallation(*manifest, path)) { |
| - LOG(WARNING) << "Installation verification failed: " << path.MaybeAsASCII(); |
| + DLOG(WARNING) << "Installation verification failed: " |
| + << path.MaybeAsASCII(); |
| return false; |
| } |
| std::string version_lexical; |
| if (!manifest->GetStringASCII("version", &version_lexical)) { |
| - LOG(WARNING) << "Failed to get component version from the manifest."; |
| + DLOG(WARNING) << "Failed to get component version from the manifest."; |
| return false; |
| } |
| const base::Version version(version_lexical); |
| if (!version.IsValid()) { |
| - LOG(WARNING) << "Version in the manifest is invalid:" << version_lexical; |
| + DLOG(WARNING) << "Version in the manifest is invalid:" << version_lexical; |
| return false; |
| } |
| - LOG(WARNING) << "Preinstalled component found for " |
| - << installer_traits_->GetName() << " at " << path.MaybeAsASCII() |
| - << " with version " << version << "."; |
| + VLOG(1) << "Preinstalled component found for " << installer_traits_->GetName() |
| + << " at " << path.MaybeAsASCII() << " with version " << version |
| + << "."; |
| current_install_dir_ = path; |
| current_manifest_ = std::move(manifest); |
| @@ -204,7 +202,7 @@ bool DefaultComponentInstaller::FindPreinstallation() { |
| } |
| void DefaultComponentInstaller::StartRegistration(ComponentUpdateService* cus) { |
| - LOG(WARNING) << __FUNCTION__ << " for " << installer_traits_->GetName(); |
| + VLOG(1) << __FUNCTION__ << " for " << installer_traits_->GetName(); |
| DCHECK(task_runner_.get()); |
| DCHECK(task_runner_->RunsTasksOnCurrentThread()); |
| @@ -320,7 +318,7 @@ void DefaultComponentInstaller::UninstallOnTaskRunner() { |
| void DefaultComponentInstaller::FinishRegistration( |
| ComponentUpdateService* cus, |
| const base::Closure& callback) { |
| - LOG(WARNING) << __FUNCTION__ << " for " << installer_traits_->GetName(); |
| + VLOG(1) << __FUNCTION__ << " for " << installer_traits_->GetName(); |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| if (installer_traits_->CanAutoUpdate()) { |
| @@ -333,8 +331,8 @@ void DefaultComponentInstaller::FinishRegistration( |
| crx.fingerprint = current_fingerprint_; |
| installer_traits_->GetHash(&crx.pk_hash); |
| if (!cus->RegisterComponent(crx)) { |
| - LOG(WARNING) << "Component registration failed for " |
| - << installer_traits_->GetName(); |
| + LOG(ERROR) << "Component registration failed for " |
| + << installer_traits_->GetName(); |
| return; |
| } |
| @@ -343,7 +341,7 @@ void DefaultComponentInstaller::FinishRegistration( |
| } |
| if (!current_manifest_) { |
| - LOG(WARNING) << "No component found for " << installer_traits_->GetName(); |
| + DLOG(WARNING) << "No component found for " << installer_traits_->GetName(); |
| return; |
| } |