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

Unified Diff: chrome/common/extensions/docs/server2/features_bundle.py

Issue 375133002: Docserver: Display API features that are available to content scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 6 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
Index: chrome/common/extensions/docs/server2/features_bundle.py
diff --git a/chrome/common/extensions/docs/server2/features_bundle.py b/chrome/common/extensions/docs/server2/features_bundle.py
index 091b407502d5a5cc6d7e73f0a1a034e29b17b9e6..fed8182e5ef5da22f7f5b2dda6cc553a0e60d244 100644
--- a/chrome/common/extensions/docs/server2/features_bundle.py
+++ b/chrome/common/extensions/docs/server2/features_bundle.py
@@ -20,7 +20,7 @@ _MANIFEST_FEATURES = '_manifest_features.json'
_PERMISSION_FEATURES = '_permission_features.json'
-def HasParentFeature(feature_name, feature, all_feature_names):
+def HasParent(feature_name, feature, all_feature_names):
# A feature has a parent if it has a . in its name, its parent exists,
# and it does not explicitly specify that it has no parent.
return ('.' in feature_name and
@@ -28,11 +28,11 @@ def HasParentFeature(feature_name, feature, all_feature_names):
not feature.get('noparent'))
-def GetParentFeature(feature_name, feature, all_feature_names):
+def GetParentName(feature_name, feature, all_feature_names):
'''Returns the name of the parent feature, or None if it does not have a
parent.
'''
- if not HasParentFeature(feature_name, feature, all_feature_names):
+ if not HasParent(feature_name, feature, all_feature_names):
return None
return feature_name.rsplit('.', 1)[0]
@@ -122,7 +122,7 @@ def _ResolveFeature(feature_name,
channel = value.get('channel')
dependencies = value.get('dependencies', [])
- parent = GetParentFeature(
+ parent = GetParentName(
feature_name, value, features_map[features_type]['all_names'])
if parent is not None:
# The parent data needs to be resolved so the child can inherit it.
« no previous file with comments | « chrome/common/extensions/docs/server2/docs_server_utils.py ('k') | chrome/common/extensions/docs/server2/platform_bundle.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698