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..9a9ad9d3ed1ca3c615af596600b138c9cd0e2251 100644 |
| --- a/components/component_updater/default_component_installer.cc |
| +++ b/components/component_updater/default_component_installer.cc |
| @@ -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."; |
| 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,7 +331,7 @@ void DefaultComponentInstaller::FinishRegistration( |
| crx.fingerprint = current_fingerprint_; |
| installer_traits_->GetHash(&crx.pk_hash); |
| if (!cus->RegisterComponent(crx)) { |
| - LOG(WARNING) << "Component registration failed for " |
| + NOTREACHED() << "Component registration failed for " |
|
Sorin Jianu
2016/06/02 00:28:39
is this correct? Why assert on a condition that ca
xhwang
2016/06/02 04:00:02
It was NOTREACHED() before, I thought there's a re
Sorin Jianu
2016/06/02 17:32:52
a VLOG statement would be appropriate in my opinio
xhwang
2016/06/02 18:42:10
Done.
|
| << 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; |
| } |