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

Unified Diff: pkg/analyzer/lib/src/summary/summary_sdk.dart

Issue 2710193004: Fix SummaryDataStore to support using a ResourceProvider instead of dart:io (Closed)
Patch Set: Fix SummaryDataStore to support using a ResourceProvider instead of dart:io Created 3 years, 10 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
« no previous file with comments | « pkg/analyzer/lib/src/summary/package_bundle_reader.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/summary_sdk.dart
diff --git a/pkg/analyzer/lib/src/summary/summary_sdk.dart b/pkg/analyzer/lib/src/summary/summary_sdk.dart
index 5ac11b73173915768f03ec0cc77859b293df86df..e38d019df8bc1b7d478c902581634935bcde79cc 100644
--- a/pkg/analyzer/lib/src/summary/summary_sdk.dart
+++ b/pkg/analyzer/lib/src/summary/summary_sdk.dart
@@ -36,15 +36,17 @@ class SummaryBasedDartSdk implements DartSdk {
*/
InternalAnalysisContext _analysisContext;
- SummaryBasedDartSdk(String summaryPath, this.strongMode) {
- _dataStore = new SummaryDataStore(<String>[summaryPath]);
+ SummaryBasedDartSdk(String summaryPath, this.strongMode,
+ {this.resourceProvider}) {
+ _dataStore = new SummaryDataStore(<String>[summaryPath],
+ resourceProvider: resourceProvider);
_uriResolver = new InSummaryUriResolver(resourceProvider, _dataStore);
_bundle = _dataStore.bundles.single;
}
- SummaryBasedDartSdk.fromBundle(
- this.strongMode, PackageBundle bundle, this.resourceProvider) {
- _dataStore = new SummaryDataStore([]);
+ SummaryBasedDartSdk.fromBundle(this.strongMode, PackageBundle bundle,
+ {this.resourceProvider}) {
+ _dataStore = new SummaryDataStore([], resourceProvider: resourceProvider);
_dataStore.addBundle('dart_sdk.sum', bundle);
_uriResolver = new InSummaryUriResolver(resourceProvider, _dataStore);
_bundle = bundle;
@@ -64,7 +66,8 @@ class SummaryBasedDartSdk implements DartSdk {
SourceFactory factory = new SourceFactory(
[new DartUriResolver(this)], null, resourceProvider);
_analysisContext.sourceFactory = factory;
- SummaryDataStore dataStore = new SummaryDataStore([]);
+ SummaryDataStore dataStore =
+ new SummaryDataStore([], resourceProvider: resourceProvider);
dataStore.addBundle(null, _bundle);
_analysisContext.resultProvider =
new InputPackagesResultProvider(_analysisContext, dataStore);
« no previous file with comments | « pkg/analyzer/lib/src/summary/package_bundle_reader.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698