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

Unified Diff: pkg/analyzer/lib/file_system/memory_file_system.dart

Issue 2132073003: Validate cache consistency asynchronously. Compute modification times of physical files in a separa… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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: pkg/analyzer/lib/file_system/memory_file_system.dart
diff --git a/pkg/analyzer/lib/file_system/memory_file_system.dart b/pkg/analyzer/lib/file_system/memory_file_system.dart
index 3391433d314173a4f1e37ae585fc34b3e07a23ea..1943ddf2ba4f21535b3d230dea190912c357ec2f 100644
--- a/pkg/analyzer/lib/file_system/memory_file_system.dart
+++ b/pkg/analyzer/lib/file_system/memory_file_system.dart
@@ -80,6 +80,14 @@ class MemoryResourceProvider implements ResourceProvider {
Folder getFolder(String path) => newFolder(path);
@override
+ Future<List<int>> getModificationTimes(List<Source> sources) async {
+ return sources.map((source) {
+ String path = source.fullName;
+ return _pathToTimestamp[path] ?? -1;
+ }).toList();
+ }
+
+ @override
Resource getResource(String path) {
path = pathContext.normalize(path);
Resource resource = _pathToResource[path];

Powered by Google App Engine
This is Rietveld 408576698