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 cb40ea2328e5f0a8ea558e6f3036a8d2c2b7f86d..43122a79fabe7baaae4e1182ee15cc86e5addca8 100644 |
| --- a/components/component_updater/default_component_installer.cc |
| +++ b/components/component_updater/default_component_installer.cc |
| @@ -38,7 +38,7 @@ ComponentInstallerTraits::~ComponentInstallerTraits() { |
| } |
| DefaultComponentInstaller::DefaultComponentInstaller( |
| - scoped_ptr<ComponentInstallerTraits> installer_traits) |
| + std::unique_ptr<ComponentInstallerTraits> installer_traits) |
| : current_version_(kNullVersion), |
| main_task_runner_(base::ThreadTaskRunnerHandle::Get()) { |
| installer_traits_ = std::move(installer_traits); |
| @@ -117,10 +117,11 @@ bool DefaultComponentInstaller::Install(const base::DictionaryValue& manifest, |
| return false; |
| } |
| current_version_ = version; |
| - // TODO(ddorwin): Change the parameter to scoped_ptr<base::DictionaryValue> |
| + // TODO(ddorwin): Change the parameter to |
| + // std::unique_ptr<base::DictionaryValue> |
| // so we can avoid this DeepCopy. |
|
danakj
2016/04/26 01:27:53
fix comment wrapping
dcheng
2016/04/26 01:35:02
Done.
|
| current_manifest_.reset(manifest.DeepCopy()); |
| - scoped_ptr<base::DictionaryValue> manifest_copy( |
| + std::unique_ptr<base::DictionaryValue> manifest_copy( |
| current_manifest_->DeepCopy()); |
| main_task_runner_->PostTask( |
| FROM_HERE, |
| @@ -162,7 +163,7 @@ void DefaultComponentInstaller::StartRegistration(ComponentUpdateService* cus) { |
| base::FilePath latest_path; |
| base::Version latest_version(kNullVersion); |
| - scoped_ptr<base::DictionaryValue> latest_manifest; |
| + std::unique_ptr<base::DictionaryValue> latest_manifest; |
| std::vector<base::FilePath> older_paths; |
| base::FileEnumerator file_enumerator( |
| @@ -184,7 +185,7 @@ void DefaultComponentInstaller::StartRegistration(ComponentUpdateService* cus) { |
| continue; |
| } |
| - scoped_ptr<base::DictionaryValue> manifest = |
| + std::unique_ptr<base::DictionaryValue> manifest = |
| update_client::ReadManifest(path); |
| if (!manifest || !installer_traits_->VerifyInstallation(*manifest, path)) { |
| PLOG(ERROR) << "Failed to read manifest or verify installation for " |
| @@ -279,13 +280,13 @@ void DefaultComponentInstaller::FinishRegistration( |
| if (!current_manifest_) |
| return; |
| - scoped_ptr<base::DictionaryValue> manifest_copy( |
| + std::unique_ptr<base::DictionaryValue> manifest_copy( |
| current_manifest_->DeepCopy()); |
| ComponentReady(std::move(manifest_copy)); |
| } |
| void DefaultComponentInstaller::ComponentReady( |
| - scoped_ptr<base::DictionaryValue> manifest) { |
| + std::unique_ptr<base::DictionaryValue> manifest) { |
| VLOG(1) << "Component ready, version " << current_version_.GetString() |
| << " in " << GetInstallDirectory().value(); |
| installer_traits_->ComponentReady(current_version_, GetInstallDirectory(), |