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

Unified Diff: chrome/test/base/testing_browser_process.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/test/base/testing_browser_process.cc
diff --git a/chrome/test/base/testing_browser_process.cc b/chrome/test/base/testing_browser_process.cc
index 8896b3862abaf9b63050062fda6e9b255a834f10..2e56816d45b16d461734b79b5ccc66737dfcc51f 100644
--- a/chrome/test/base/testing_browser_process.cc
+++ b/chrome/test/base/testing_browser_process.cc
@@ -349,6 +349,25 @@ TestingBrowserProcess::pnacl_component_installer() {
return nullptr;
}
+#if defined(OS_CHROMEOS)
+component_updater::DefaultComponentInstaller*
+TestingBrowserProcess::cros_component_installer(
+ const std::string& name,
+ std::unique_ptr<component_updater::ComponentInstallerTraits>
+ installer_traits) {
+ static std::map<std::string,
+ scoped_refptr<component_updater::DefaultComponentInstaller>>
+ cros_component_installers_;
+ 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].get();
+}
+#endif
+
component_updater::SupervisedUserWhitelistInstaller*
TestingBrowserProcess::supervised_user_whitelist_installer() {
return nullptr;
« chrome/browser/browser_process.h ('K') | « chrome/test/base/testing_browser_process.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698