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

Side by Side Diff: chrome/common/extensions/docs/server2/api_data_source.py

Issue 255473003: docserver: Adds "API scheduled for Chrome version..." text to dev and beta APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from copy import copy 5 from copy import copy
6 import logging 6 import logging
7 import os 7 import os
8 import posixpath 8 import posixpath
9 9
10 from data_source import DataSource 10 from data_source import DataSource
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 { 'text': self._namespace.description } 344 { 'text': self._namespace.description }
345 ] 345 ]
346 } 346 }
347 347
348 def _GetIntroAvailabilityRow(self): 348 def _GetIntroAvailabilityRow(self):
349 ''' Generates the 'Availability' row data for an API intro table. 349 ''' Generates the 'Availability' row data for an API intro table.
350 ''' 350 '''
351 if self._IsExperimental(): 351 if self._IsExperimental():
352 status = 'experimental' 352 status = 'experimental'
353 version = None 353 version = None
354 scheduled = None
354 else: 355 else:
355 availability = self._GetApiAvailability() 356 availability = self._GetApiAvailability()
356 status = availability.channel 357 status = availability.channel
357 version = availability.version 358 version = availability.version
359 scheduled = availability.scheduled
358 return { 360 return {
359 'title': 'Availability', 361 'title': 'Availability',
360 'content': [{ 362 'content': [{
361 'partial': self._template_cache.GetFromFile( 363 'partial': self._template_cache.GetFromFile(
362 posixpath.join(PRIVATE_TEMPLATES, 364 posixpath.join(PRIVATE_TEMPLATES,
363 'intro_tables', 365 'intro_tables',
364 '%s_message.html' % status)).Get(), 366 '%s_message.html' % status)).Get(),
365 'version': version 367 'version': version,
368 'scheduled': scheduled
366 }] 369 }]
367 } 370 }
368 371
369 def _GetIntroDependencyRows(self): 372 def _GetIntroDependencyRows(self):
370 # Devtools aren't in _api_features. If we're dealing with devtools, bail. 373 # Devtools aren't in _api_features. If we're dealing with devtools, bail.
371 if 'devtools' in self._namespace.name: 374 if 'devtools' in self._namespace.name:
372 return [] 375 return []
373 376
374 api_feature = self._api_features.Get().get(self._namespace.name) 377 api_feature = self._api_features.Get().get(self._namespace.name)
375 if not api_feature: 378 if not api_feature:
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 self._samples) 522 self._samples)
520 return handlebar_dict 523 return handlebar_dict
521 return Future(callback=resolve) 524 return Future(callback=resolve)
522 525
523 def get(self, api_name): 526 def get(self, api_name):
524 return self._GetImpl(api_name).Get() 527 return self._GetImpl(api_name).Get()
525 528
526 def Cron(self): 529 def Cron(self):
527 futures = [self._GetImpl(name) for name in self._api_models.GetNames()] 530 futures = [self._GetImpl(name) for name in self._api_models.GetNames()]
528 return Collect(futures, except_pass=FileNotFoundError) 531 return Collect(futures, except_pass=FileNotFoundError)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698