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

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

Issue 491653002: Docserver: Use GitilesFileSystem instead of SubversionFileSystem (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 data_source import DataSource 5 from data_source import DataSource
6 from future import Future 6 from future import Future
7 from operator import itemgetter 7 from operator import itemgetter
8 from platform_util import GetPlatforms 8 from platform_util import GetPlatforms
9 9
10 from docs_server_utils import MarkFirstAndLast, MarkLast 10 from docs_server_utils import MarkFirstAndLast, MarkLast
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 else: 46 else:
47 del csa['restrictedTo'] 47 del csa['restrictedTo']
48 return content_script_apis_list 48 return content_script_apis_list
49 49
50 return (self._platform_bundle.GetAPIModels('extensions') 50 return (self._platform_bundle.GetAPIModels('extensions')
51 .GetContentScriptAPIs() 51 .GetContentScriptAPIs()
52 .Then(convert_to_list)) 52 .Then(convert_to_list))
53 53
54 def make_dict_for_platform(platform): 54 def make_dict_for_platform(platform):
55 platform_dict = { 55 platform_dict = {
56 'chrome': {'stable': [], 'beta': [], 'dev': [], 'trunk': []}, 56 'chrome': {'stable': [], 'beta': [], 'dev': [], 'master': []},
57 } 57 }
58 private_apis = [] 58 private_apis = []
59 experimental_apis = [] 59 experimental_apis = []
60 all_apis = [] 60 all_apis = []
61 for api_name, api_model in self._platform_bundle.GetAPIModels( 61 for api_name, api_model in self._platform_bundle.GetAPIModels(
62 platform).IterModels(): 62 platform).IterModels():
63 if not self._platform_bundle.GetAPICategorizer(platform).IsDocumented( 63 if not self._platform_bundle.GetAPICategorizer(platform).IsDocumented(
64 api_name): 64 api_name):
65 continue 65 continue
66 api = { 66 api = {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 if data is None: 114 if data is None:
115 return self._GenerateAPIDict().Then(persist_and_return) 115 return self._GenerateAPIDict().Then(persist_and_return)
116 return data 116 return data
117 return self._object_store.Get('api_data').Then(return_or_generate) 117 return self._object_store.Get('api_data').Then(return_or_generate)
118 118
119 def get(self, key): 119 def get(self, key):
120 return self._GetCachedAPIData().Get().get(key) 120 return self._GetCachedAPIData().Get().get(key)
121 121
122 def Cron(self): 122 def Cron(self):
123 return self._GetCachedAPIData() 123 return self._GetCachedAPIData()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698