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

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

Issue 16410002: Docserver manifest follow up (rewrite) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gen-manifest-try-2
Patch Set: replace dictionaries with Feature class Created 7 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/manifest_data_source.py
diff --git a/chrome/common/extensions/docs/server2/manifest_data_source.py b/chrome/common/extensions/docs/server2/manifest_data_source.py
index a10f41c74e00f7e02039183ec5cc5bc81b80b96e..5d1fea77a33a1a317a9507deb24537c5b9369ec5 100644
--- a/chrome/common/extensions/docs/server2/manifest_data_source.py
+++ b/chrome/common/extensions/docs/server2/manifest_data_source.py
@@ -17,7 +17,7 @@ def _ListifyAndSortDocs(properties, platform):
'''
levels = ('required', 'recommended', 'only_one', 'optional')
- return (levels.index(item.get('level', 'optional')), item['name'])
+ return (levels.index(item.get('level', 'optional')), item.name)
def convert_and_sort(properties):
for key, value in properties.items():
@@ -36,6 +36,7 @@ def _ListifyAndSortDocs(properties, platform):
return sorted(properties.values(), key=sort_key)
+ # Fix the 'name' manifest property's example.
not at google - send to devlin 2013/08/05 22:23:49 I don't know what this means, can you give some co
name = properties['name']
name['example'] = name['example'].replace('{{title}}', platform.capitalize())
@@ -82,7 +83,7 @@ def _RestructureChildren(features):
children can have children.
'''
def add_child(features, parent, child_name, value):
- value['name'] = child_name
+ value.name = child_name
not at google - send to devlin 2013/08/05 22:23:49 So IIRC from our email, the purpose of storing the
if not 'children' in features[parent]:
features[parent]['children'] = {}
features[parent]['children'][child_name] = value

Powered by Google App Engine
This is Rietveld 408576698