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

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

Issue 1070873002: [Extension DocServer] Remove availability warning for enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/jsc_view.py
diff --git a/chrome/common/extensions/docs/server2/jsc_view.py b/chrome/common/extensions/docs/server2/jsc_view.py
index 967d0ef67f3afb68048761636eb2d21b81f0c4d0..e5150185ca2ee2ae175f753febd1cce0880a2c7b 100644
--- a/chrome/common/extensions/docs/server2/jsc_view.py
+++ b/chrome/common/extensions/docs/server2/jsc_view.py
@@ -233,7 +233,8 @@ class _JSCViewBuilder(object):
'functions': self._GenerateFunctions(type_.functions),
'events': self._GenerateEvents(type_.events),
'id': _CreateId(type_, 'type'),
- 'availability': self._GetAvailabilityTemplate()
+ 'availability': self._GetAvailabilityTemplate(
+ is_enum=type_.property_type == model.PropertyType.ENUM)
}
self._RenderTypeInformation(type_, type_dict)
return type_dict
@@ -444,7 +445,7 @@ class _JSCViewBuilder(object):
'version': version
}
- def _GetAvailabilityTemplate(self):
+ def _GetAvailabilityTemplate(self, is_enum=False):
'''Gets availability for the current node and returns an appropriate
template object.
'''
@@ -453,6 +454,9 @@ class _JSCViewBuilder(object):
availability_info = self._current_node.GetDeprecated()
if availability_info is not None:
status = 'deprecated'
+ # We don't show an availability warning for enums.
not at google - send to devlin 2015/04/08 18:05:17 If we *really* don't want to show availability war
Devlin 2015/04/08 19:44:02 Done, done, and done.
+ elif is_enum:
+ return None
else:
availability_info = self._current_node.GetAvailability()
if availability_info is None:

Powered by Google App Engine
This is Rietveld 408576698