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

Unified Diff: services/shell/public/tools/manifest/manifest_collator.py

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/shell/public/service_manifest.gypi ('k') | services/shell/runner/child/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/public/tools/manifest/manifest_collator.py
diff --git a/mojo/public/tools/manifest/manifest_collator.py b/services/shell/public/tools/manifest/manifest_collator.py
similarity index 65%
rename from mojo/public/tools/manifest/manifest_collator.py
rename to services/shell/public/tools/manifest/manifest_collator.py
index 9a6d0e9b01049681a0f8e0c309faa288aeea1b23..4cf845b38b8a5434ac531b222f3e0b533a55c1ef 100755
--- a/mojo/public/tools/manifest/manifest_collator.py
+++ b/services/shell/public/tools/manifest/manifest_collator.py
@@ -3,7 +3,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-""" A collator for Mojo Application Manifests """
+""" A collator for Service Manifests """
import argparse
import json
@@ -12,7 +12,7 @@ import shutil
import sys
import urlparse
-eater_relative = '../../../../../tools/json_comment_eater'
+eater_relative = '../../../../../../tools/json_comment_eater'
eater_relative = os.path.join(os.path.abspath(__file__), eater_relative)
sys.path.insert(0, os.path.normpath(eater_relative))
try:
@@ -47,10 +47,10 @@ def MergeDicts(left, right):
def MergeBaseManifest(parent, base):
MergeDicts(parent["capabilities"], base["capabilities"])
- if "applications" in base:
- if "applications" not in parent:
- parent["applications"] = []
- parent["applications"].extend(base["applications"])
+ if "services" in base:
+ if "services" not in parent:
+ parent["services"] = []
+ parent["services"].extend(base["services"])
if "process-group" in base:
parent["process-group"] = base["process-group"]
@@ -58,10 +58,10 @@ def MergeBaseManifest(parent, base):
def main():
parser = argparse.ArgumentParser(
- description="Collate Mojo application manifests.")
+ description="Collate Service Manifests.")
parser.add_argument("--parent")
parser.add_argument("--output")
- parser.add_argument("--application-name")
+ parser.add_argument("--name")
parser.add_argument("--base-manifest", default=None)
args, children = parser.parse_known_args()
@@ -75,25 +75,25 @@ def main():
return 1
MergeBaseManifest(parent, base)
- app_path = parent['name'].split(':')[1]
- if app_path.startswith('//'):
- raise ValueError("Application name path component '%s' must not start " \
- "with //" % app_path)
+ service_path = parent['name'].split(':')[1]
+ if service_path.startswith('//'):
+ raise ValueError("Service name path component '%s' must not start " \
+ "with //" % service_path)
- if args.application_name != app_path:
- raise ValueError("Application name '%s' specified in build file does not " \
- "match application name '%s' specified in manifest." %
- (args.application_name, app_path))
+ if args.name != service_path:
+ raise ValueError("Service name '%s' specified in build file does not " \
+ "match name '%s' specified in manifest." %
+ (args.name, service_path))
- applications = []
+ services = []
for child in children:
- application = ParseJSONFile(child)
- if application == None:
+ service = ParseJSONFile(child)
+ if service == None:
return 1
- applications.append(application)
+ services.append(service)
- if len(applications) > 0:
- parent['applications'] = applications
+ if len(services) > 0:
+ parent['services'] = services
with open(args.output, 'w') as output_file:
json.dump(parent, output_file)
« no previous file with comments | « services/shell/public/service_manifest.gypi ('k') | services/shell/runner/child/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698