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

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

Issue 2655943002: Bake chrome mash catalog into MashRunner (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') | no next file » | 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 72da180500ea28703f49e08d926401a4a64d34ed..42c50057af7da534c66aaff476929d6d813b87d2 100644
--- a/chrome/app/mash/mash_runner.cc
+++ b/chrome/app/mash/mash_runner.cc
@@ -61,6 +61,9 @@
using service_manager::mojom::ServiceFactory;
+// Defined externally by the ":catalog_cpp_source" target.
+extern const char kChromeMashCatalogContents[];
+
namespace {
// kProcessType used to identify child processes.
@@ -68,9 +71,6 @@ const char* kMashChild = "mash-child";
const char kChromeMashServiceName[] = "chrome_mash";
-const base::FilePath::CharType kChromeMashCatalogFilename[] =
- FILE_PATH_LITERAL("chrome_mash_catalog.json");
-
bool IsChild() {
return base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kProcessType) &&
@@ -177,14 +177,8 @@ void MashRunner::RunMain() {
ipc_thread.task_runner(),
mojo::edk::ScopedIPCSupport::ShutdownPolicy::FAST);
- std::string catalog_contents;
- base::FilePath exe_path;
- base::PathService::Get(base::DIR_EXE, &exe_path);
- base::FilePath catalog_path = exe_path.Append(kChromeMashCatalogFilename);
- bool result = base::ReadFileToString(catalog_path, &catalog_contents);
- DCHECK(result);
std::unique_ptr<base::Value> manifest_value =
- base::JSONReader::Read(catalog_contents);
+ base::JSONReader::Read(kChromeMashCatalogContents);
DCHECK(manifest_value);
// TODO(sky): refactor BackgroundServiceManager so can supply own context, we
« no previous file with comments | « chrome/app/mash/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698