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

Unified Diff: chrome/browser/browser_process_platform_part_chromeos.cc

Issue 2898063002: Hold cros_component_installers in browser_process. (Closed)
Patch Set: switch to smart pointer 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/browser_process_platform_part_chromeos.cc
diff --git a/chrome/browser/browser_process_platform_part_chromeos.cc b/chrome/browser/browser_process_platform_part_chromeos.cc
index 4b63b33c1daa1e26f6c42546c58b4710352232d9..e4f670c95145e5103970f071585b457a3a021ef8 100644
--- a/chrome/browser/browser_process_platform_part_chromeos.cc
+++ b/chrome/browser/browser_process_platform_part_chromeos.cc
@@ -159,3 +159,17 @@ void BrowserProcessPlatformPart::CreateProfileHelper() {
created_profile_helper_ = true;
profile_helper_.reset(new chromeos::ProfileHelper());
}
+
+scoped_refptr<component_updater::DefaultComponentInstaller>
sky 2017/05/23 23:20:29 Style guide says position definition and declarati
xiaochu 2017/05/23 23:40:52 Done.
+BrowserProcessPlatformPart::GetCrosComponentInstaller(
+ const std::string& name,
+ std::unique_ptr<component_updater::ComponentInstallerTraits>
+ installer_traits) {
+ auto it = cros_component_installers_.find(name);
+ if (it == cros_component_installers_.end()) {
+ cros_component_installers_[name] =
+ new component_updater::DefaultComponentInstaller(
+ std::move(installer_traits));
+ }
+ return cros_component_installers_[name];
+}

Powered by Google App Engine
This is Rietveld 408576698