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

Unified Diff: chrome/app/mash/mash_runner.cc

Issue 2659523002: Generate better catalog C++ sources (Closed)
Patch Set: Created 3 years, 11 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/mash/BUILD.gn ('k') | services/catalog/public/tools/catalog.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/mash/mash_runner.cc
diff --git a/chrome/app/mash/mash_runner.cc b/chrome/app/mash/mash_runner.cc
index 42c50057af7da534c66aaff476929d6d813b87d2..f4720fb00761b75508c6e561ecfa4cb47b1c1349 100644
--- a/chrome/app/mash/mash_runner.cc
+++ b/chrome/app/mash/mash_runner.cc
@@ -15,7 +15,6 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/i18n/icu_util.h"
-#include "base/json/json_reader.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
@@ -28,6 +27,7 @@
#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/thread.h"
#include "base/trace_event/trace_event.h"
+#include "chrome/app/mash/chrome_mash_catalog.h"
#include "components/tracing/common/trace_to_console.h"
#include "components/tracing/common/tracing_switches.h"
#include "content/public/common/content_switches.h"
@@ -61,9 +61,6 @@
using service_manager::mojom::ServiceFactory;
-// Defined externally by the ":catalog_cpp_source" target.
-extern const char kChromeMashCatalogContents[];
-
namespace {
// kProcessType used to identify child processes.
@@ -177,16 +174,12 @@ void MashRunner::RunMain() {
ipc_thread.task_runner(),
mojo::edk::ScopedIPCSupport::ShutdownPolicy::FAST);
- std::unique_ptr<base::Value> manifest_value =
- base::JSONReader::Read(kChromeMashCatalogContents);
- DCHECK(manifest_value);
-
// TODO(sky): refactor BackgroundServiceManager so can supply own context, we
// shouldn't we using context as it has a lot of stuff we don't really want
// in chrome.
ServiceProcessLauncherDelegateImpl service_process_launcher_delegate;
service_manager::BackgroundServiceManager background_service_manager(
- &service_process_launcher_delegate, std::move(manifest_value));
+ &service_process_launcher_delegate, CreateChromeMashCatalog());
service_manager::mojom::ServicePtr service;
context_.reset(new service_manager::ServiceContext(
base::MakeUnique<mash::MashPackagedService>(),
« no previous file with comments | « chrome/app/mash/BUILD.gn ('k') | services/catalog/public/tools/catalog.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698