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

Unified Diff: chrome/app/chrome_main_delegate.cc

Issue 2910383002: mash: Add catalog/manifest etc. for telemetry tests binary for mash. (Closed)
Patch Set: . Created 3 years, 6 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
« no previous file with comments | « chrome/app/chrome_main_delegate.h ('k') | chrome/app/chrome_test_exe_main_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main_delegate.cc
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index d105144bb2c1d3e8c697a85189cdee73519c86ba..1b6ad13b38d0bd8fe79494e18f8406d29682dc4e 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -193,6 +193,9 @@ extern int CloudPrintServiceProcessMain(const content::MainFunctionParams&);
namespace {
+base::LazyInstance<ChromeMainDelegate::ServiceCatalogFactory>::Leaky
+ g_service_catalog_factory = LAZY_INSTANCE_INITIALIZER;
+
#if defined(OS_WIN)
// Early versions of Chrome incorrectly registered a chromehtml: URL handler,
// which gives us nothing but trouble. Avoid launching chrome this way since
@@ -523,6 +526,12 @@ ChromeMainDelegate::ChromeMainDelegate(base::TimeTicks exe_entry_point_ticks) {
ChromeMainDelegate::~ChromeMainDelegate() {
}
+// static
+void ChromeMainDelegate::InstallServiceCatalogFactory(
+ ServiceCatalogFactory factory) {
+ g_service_catalog_factory.Get() = std::move(factory);
+}
+
bool ChromeMainDelegate::BasicStartupComplete(int* exit_code) {
#if defined(OS_CHROMEOS)
chromeos::BootTimesRecorder::Get()->SaveChromeMainStats();
@@ -1128,6 +1137,8 @@ service_manager::ProcessType ChromeMainDelegate::OverrideProcessType() {
}
std::unique_ptr<base::Value> ChromeMainDelegate::CreateServiceCatalog() {
+ if (!g_service_catalog_factory.Get().is_null())
+ return g_service_catalog_factory.Get().Run();
#if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES)
const auto& command_line = *base::CommandLine::ForCurrentProcess();
#if defined(OS_CHROMEOS)
« no previous file with comments | « chrome/app/chrome_main_delegate.h ('k') | chrome/app/chrome_test_exe_main_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698