Chromium Code Reviews| Index: chrome/browser/component_updater/cros_component_installer.cc |
| diff --git a/chrome/browser/component_updater/cros_component_installer.cc b/chrome/browser/component_updater/cros_component_installer.cc |
| index b68cd03f14e51a67945e8b6a09eaa450bfb6cfc5..e21d3d127cb5edb3c8b18688fac111c2f3cdd029 100644 |
| --- a/chrome/browser/component_updater/cros_component_installer.cc |
| +++ b/chrome/browser/component_updater/cros_component_installer.cc |
| @@ -128,6 +128,7 @@ std::vector<std::string> CrOSComponentInstallerTraits::GetMimeTypes() const { |
| } |
| void CrOSComponent::RegisterCrOSComponentInternal( |
| + const std::string& name, |
| ComponentUpdateService* cus, |
| const ComponentConfig& config, |
| const base::Closure& installcallback) { |
| @@ -135,8 +136,9 @@ void CrOSComponent::RegisterCrOSComponentInternal( |
| new CrOSComponentInstallerTraits(config)); |
| // |cus| will take ownership of |installer| during |
|
sky
2017/05/23 23:20:30
Update comment?
Also, I'm rather confused about t
xiaochu
2017/05/23 23:40:52
Done.
|
| // installer->Register(cus). |
| - DefaultComponentInstaller* installer = |
| - new DefaultComponentInstaller(std::move(traits)); |
| + scoped_refptr<DefaultComponentInstaller> installer = |
| + g_browser_process->platform_part()->GetCrosComponentInstaller( |
| + name, std::move(traits)); |
| installer->Register(cus, installcallback); |
| } |
| @@ -174,7 +176,7 @@ bool CrOSComponent::InstallCrOSComponent( |
| ComponentConfig config(it->first, it->second.find("env_version")->second, |
| it->second.find("sha2hashstr")->second); |
| RegisterCrOSComponentInternal( |
| - cus, config, |
| + name, cus, config, |
| base::Bind(InstallChromeOSComponent, cus, |
| crx_file::id_util::GenerateIdFromHex( |
| it->second.find("sha2hashstr")->second) |