| Index: chrome/common/extensions/docs/server2/template_data_source.py
|
| diff --git a/chrome/common/extensions/docs/server2/template_data_source.py b/chrome/common/extensions/docs/server2/template_data_source.py
|
| index e00bb3ebc8702d82565246e671a4040cdef2403c..e0b5bf42cf18e9335d02f8c48473939942f784aa 100644
|
| --- a/chrome/common/extensions/docs/server2/template_data_source.py
|
| +++ b/chrome/common/extensions/docs/server2/template_data_source.py
|
| @@ -16,9 +16,16 @@ _VERSION = 2
|
|
|
| EXTENSIONS_URL = '/chrome/extensions'
|
|
|
| -def _MakeChannelDict(channel_name):
|
| - channel_dict = {
|
| - 'channels': [{'name': name} for name in BranchUtility.GetAllBranchNames()],
|
| +def _MakeChannelDict(channel_name, all_channels):
|
| + return {
|
| + 'channels' : [
|
| + {
|
| + 'name': channel['name'],
|
| + 'version': channel['version'],
|
| + 'path': channel['name'],
|
| + 'isCurrent': channel['name'] == channel_name
|
| + } for channel in all_channels
|
| + ],
|
| 'current': channel_name
|
| }
|
| for channel in channel_dict['channels']:
|
| @@ -53,8 +60,9 @@ class TemplateDataSource(object):
|
| cache_factory,
|
| ref_resolver_factory,
|
| public_template_path,
|
| - private_template_path):
|
| - self._branch_info = _MakeChannelDict(channel_name)
|
| + private_template_path,
|
| + all_channels):
|
| + self._branch_info = _MakeChannelDict(channel_name, all_channels)
|
| self._api_data_source_factory = api_data_source_factory
|
| self._api_list_data_source_factory = api_list_data_source_factory
|
| self._intro_data_source_factory = intro_data_source_factory
|
|
|