| Index: chrome/common/extensions/docs/server2/availability_finder.py
|
| diff --git a/chrome/common/extensions/docs/server2/availability_finder.py b/chrome/common/extensions/docs/server2/availability_finder.py
|
| index 31564d1c30a3ac10a22342af25ec60befff70760..547150c3a66d3686a7dbc3e91775e59b76a4ddf7 100644
|
| --- a/chrome/common/extensions/docs/server2/availability_finder.py
|
| +++ b/chrome/common/extensions/docs/server2/availability_finder.py
|
| @@ -208,6 +208,24 @@ class AvailabilityFinder(object):
|
| file_system,
|
| channel_info)
|
|
|
| + def _FindScheduled(self, api_name):
|
| + '''Determines the earliest version of Chrome where the API is stable.
|
| + Unlike the code in GetApiAvailability, this checks if the API is stable
|
| + even when Chrome is in dev or beta, which shows that the API is scheduled
|
| + to be stable in that verison of Chrome.
|
| + '''
|
| + def check_scheduled(file_system, channel_info):
|
| + return self._CheckStableAvailability(api_name,
|
| + file_system,
|
| + channel_info.version)
|
| + stable_availability = self._file_system_iterator.Descending(
|
| + self._branch_utility.GetChannelInfo('dev'),
|
| + check_scheduled)
|
| + if stable_availability:
|
| + return stable_availability.version
|
| + else:
|
| + return None
|
| +
|
| def GetApiAvailability(self, api_name):
|
| '''Performs a search for an API's top-level availability by using a
|
| HostFileSystemIterator instance to traverse multiple version of the
|
| @@ -232,6 +250,12 @@ class AvailabilityFinder(object):
|
| if availability is None:
|
| # The API wasn't available on 'dev', so it must be a 'trunk'-only API.
|
| availability = self._branch_utility.GetChannelInfo('trunk')
|
| +
|
| + # If the API is not stable, check if it is stable in the dev or beta
|
| + # versions of Chrome. This means that the API is scheduled to be stable.
|
| + if availability.channel != 'stable':
|
| + availability.scheduled = self._FindScheduled(api_name)
|
| +
|
| self._top_level_object_store.Set(api_name, availability)
|
| return availability
|
|
|
|
|