Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Unified Diff: chrome/browser/component_updater/cros_component_installer.cc

Issue 2898063002: Hold cros_component_installers in browser_process. (Closed)
Patch Set: update commit message Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..bf57bde7f76ee13107737e28175015c8b2ff5933 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) {
@@ -136,7 +137,7 @@ void CrOSComponent::RegisterCrOSComponentInternal(
// |cus| will take ownership of |installer| during
// installer->Register(cus).
DefaultComponentInstaller* installer =
- new DefaultComponentInstaller(std::move(traits));
+ g_browser_process->cros_component_installer(name, std::move(traits));
installer->Register(cus, installcallback);
}
@@ -174,7 +175,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)

Powered by Google App Engine
This is Rietveld 408576698