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

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

Issue 532423002: Inlining references to internal APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing extensionTypes from chrome api features (still in extension api features) 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 side-by-side diff with in-line comments
Download patch
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 797cd013d80882698f7aac4d9298000a6fe56728..676ea30e23237319e85a1153157fdd18179e04ec 100644
--- a/chrome/common/extensions/docs/server2/availability_finder.py
+++ b/chrome/common/extensions/docs/server2/availability_finder.py
@@ -117,7 +117,8 @@ class AvailabilityFinder(object):
file_system_iterator,
host_file_system,
object_store_creator,
- platform):
+ platform,
+ process_schema_factory):
self._branch_utility = branch_utility
self._compiled_fs_factory = compiled_fs_factory
self._file_system_iterator = file_system_iterator
@@ -130,6 +131,10 @@ class AvailabilityFinder(object):
self._node_level_object_store = create_object_store('node_level')
self._json_fs = compiled_fs_factory.ForJson(self._host_file_system)
self._platform = platform
+ # When processing the API schemas, we retain inlined types in the schema
+ # so that there are not missing nodes in the APISchemaGraphs when trying
+ # to lookup availability.
+ self._process_schema = process_schema_factory.Create(True)
def _GetPredeterminedAvailability(self, api_name):
'''Checks a configuration file for hardcoded (i.e. predetermined)
@@ -150,11 +155,8 @@ class AvailabilityFinder(object):
'''Creates a CompiledFileSystem for parsing raw JSON or IDL API schema
data and formatting it so that it can be used to create APISchemaGraphs.
'''
- # When processing the API schemas, we retain inlined types in the schema
- # so that there are not missing nodes in the APISchemaGraphs when trying
- # to lookup availability.
def process_schema(path, data):
- return ProcessSchema(path, data, retain_inlined_types=True)
+ return self._process_schema.Process(path, data)
return self._compiled_fs_factory.Create(file_system,
SingleFile(Unicode(process_schema)),
CompiledFileSystem,

Powered by Google App Engine
This is Rietveld 408576698