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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/byte_store.dart

Issue 2653203005: Add NullByteStore, that does not store any data. (Closed)
Patch Set: Created 3 years, 11 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/src/dart/analysis/byte_store.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/byte_store.dart b/pkg/analyzer/lib/src/dart/analysis/byte_store.dart
index 3f3f5dbf16ea9c3307dced03c29e3912cb392da9..2f151f9678738767cb7536ada71a3078a88e9a3a 100644
--- a/pkg/analyzer/lib/src/dart/analysis/byte_store.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/byte_store.dart
@@ -98,3 +98,14 @@ class MemoryCachingByteStore implements ByteStore {
}
}
}
+
+/**
+ * [ByteStore] which does not store any data.
+ */
+class NullByteStore implements ByteStore {
+ @override
+ List<int> get(String key) => null;
+
+ @override
+ void put(String key, List<int> bytes) {}
+}

Powered by Google App Engine
This is Rietveld 408576698