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

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

Issue 12996003: Dynamically generate a heading for Extension Docs API pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor changes Created 7 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/server_instance.py
diff --git a/chrome/common/extensions/docs/server2/server_instance.py b/chrome/common/extensions/docs/server2/server_instance.py
index 7f3e6cd01ba1a5a3b4ae27e0020db2fa1d4449f4..564b84f9134ff06fffab0f5f65c981c3e41dfd1d 100644
--- a/chrome/common/extensions/docs/server2/server_instance.py
+++ b/chrome/common/extensions/docs/server2/server_instance.py
@@ -13,8 +13,10 @@ from api_list_data_source import APIListDataSource
from appengine_blobstore import AppEngineBlobstore
from appengine_url_fetcher import AppEngineUrlFetcher
from appengine_wrappers import GetAppVersion, IsDevServer
+from availability_data_source import AvailabilityDataSource
from branch_utility import BranchUtility
from caching_file_system import CachingFileSystem
+from chrome_version_utility import ChromeVersionUtility
from compiled_file_system import CompiledFileSystem
from empty_dir_file_system import EmptyDirFileSystem
from example_zipper import ExampleZipper
@@ -56,7 +58,7 @@ class ServerInstance(object):
setting up the subversion nor github file systems.
'''
branch_utility = ServerInstance._GetOrCreateBranchUtility()
- branch = branch_utility.GetBranchNumberForChannelName(channel)
+ branch = branch_utility.GetChannelInfoForChannelName(channel).branch
object_store_creator_factory = ObjectStoreCreator.Factory(GetAppVersion(),
branch)
# No svn nor github file systems. Rely on the crons to fill the caches, and
@@ -78,7 +80,7 @@ class ServerInstance(object):
subversion/github resources are queried.
'''
branch_utility = ServerInstance._GetOrCreateBranchUtility()
- branch = branch_utility.GetBranchNumberForChannelName(channel)
+ branch = branch_utility.GetChannelInfoForChannelName(channel).branch
if branch == 'trunk':
svn_url = '/'.join((url_constants.SVN_TRUNK_URL,
@@ -148,6 +150,16 @@ class ServerInstance(object):
svn_file_system,
object_store_creator_factory)
+ self.chrome_version_utility = ChromeVersionUtility(
+ url_constants.OMAHA_DEV_HISTORY,
+ AppEngineUrlFetcher(None),
+ object_store_creator_factory)
+
+ self.availability_data_source_factory = AvailabilityDataSource.Factory(
+ self.chrome_version_utility,
+ object_store_creator_factory,
+ svn_file_system)
not at google - send to devlin 2013/04/30 18:34:19 I think we need to pass in a special trunk svn fil
epeterson 2013/05/13 02:38:10 Definitely, thanks for catching that.
+
self.api_list_data_source_factory = APIListDataSource.Factory(
self.compiled_fs_factory,
svn_constants.API_PATH,
@@ -155,7 +167,9 @@ class ServerInstance(object):
self.api_data_source_factory = APIDataSource.Factory(
self.compiled_fs_factory,
- svn_constants.API_PATH)
+ svn_constants.API_PATH,
+ self.availability_data_source_factory,
+ svn_file_system)
self.ref_resolver_factory = ReferenceResolver.Factory(
self.api_data_source_factory,

Powered by Google App Engine
This is Rietveld 408576698