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

Unified Diff: services/catalog/reader.cc

Issue 2164503006: Rename mojo_application GN templates to service* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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 | « services/catalog/entry.cc ('k') | services/catalog/store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/catalog/reader.cc
diff --git a/services/catalog/reader.cc b/services/catalog/reader.cc
index 1f4a4eff3d294c1f09a544c3bf733e79ad9df1b4..4d08eb034ed960c058e792d9140c635f12163866 100644
--- a/services/catalog/reader.cc
+++ b/services/catalog/reader.cc
@@ -36,13 +36,13 @@ base::FilePath GetManifestPath(const base::FilePath& package_dir,
}
-base::FilePath GetPackagePath(const base::FilePath& package_dir,
- const std::string& name) {
+base::FilePath GetExecutablePath(const base::FilePath& package_dir,
+ const std::string& name) {
std::string type = shell::GetNameType(name);
if (type == shell::kNameType_Mojo) {
// It's still a mojo: URL, use the default mapping scheme.
const std::string host = shell::GetNamePath(name);
- return package_dir.AppendASCII(host + "/" + host + ".mojo");
+ return package_dir.AppendASCII(host + "/" + host + ".library");
}
if (type == shell::kNameType_Exe) {
#if defined OS_WIN
@@ -69,7 +69,7 @@ std::unique_ptr<Entry> ProcessManifest(
std::unique_ptr<Entry> entry = Entry::Deserialize(*dictionary);
if (!entry)
return nullptr;
- entry->set_path(GetPackagePath(package_dir, entry->name()));
+ entry->set_path(GetExecutablePath(package_dir, entry->name()));
return entry;
}
@@ -106,7 +106,7 @@ void ScanDir(
// Skip over subdirs that contain only manifests, they're artifacts of the
// build (e.g. for applications that are packaged into others) and are not
// valid standalone packages.
- base::FilePath package_path = GetPackagePath(package_dir, entry->name());
+ base::FilePath package_path = GetExecutablePath(package_dir, entry->name());
if (entry->name() != "mojo:shell" && entry->name() != "mojo:catalog" &&
!base::PathExists(package_path)) {
continue;
@@ -126,14 +126,14 @@ std::unique_ptr<Entry> ReadManifest(const base::FilePath& package_dir,
GetManifestPath(package_dir, mojo_name), package_dir);
if (!entry) {
entry.reset(new Entry(mojo_name));
- entry->set_path(GetPackagePath(
+ entry->set_path(GetExecutablePath(
package_dir.AppendASCII(kMojoApplicationsDirName), mojo_name));
}
return entry;
}
void AddEntryToCache(EntryCache* cache, std::unique_ptr<Entry> entry) {
- for (auto* child : entry->applications())
+ for (auto* child : entry->services())
AddEntryToCache(cache, base::WrapUnique(child));
(*cache)[entry->name()] = std::move(entry);
}
« no previous file with comments | « services/catalog/entry.cc ('k') | services/catalog/store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698