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

Unified Diff: sdk/lib/convert/converter.dart

Issue 19883003: Add chunked conversion to converters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 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
« no previous file with comments | « sdk/lib/convert/convert_sources.gypi ('k') | sdk/lib/convert/encoding.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/convert/converter.dart
diff --git a/sdk/lib/convert/converter.dart b/sdk/lib/convert/converter.dart
index 8e7a6f164f9a5b8aae3319d3b58ca15456a53f8d..bdc52626eb664b59366c8c146e10040018d9f1e8 100644
--- a/sdk/lib/convert/converter.dart
+++ b/sdk/lib/convert/converter.dart
@@ -25,6 +25,14 @@ abstract class Converter<S, T> {
Converter<S, dynamic> fuse(Converter<T, dynamic> other) {
return new _FusedConverter<S, T, dynamic>(this, other);
}
+
+ /**
+ * Starts a chunked conversion.
+ */
+ ChunkedConversionSink startChunkedConversion(ChunkedConversionSink sink) {
+ throw new UnsupportedError(
+ "This converter does not support chunked conversions: $this");
+ }
}
/**
@@ -39,4 +47,8 @@ class _FusedConverter<S, M, T> extends Converter<S, T> {
_FusedConverter(this._first, this._second);
T convert(S input) => _second.convert(_first.convert(input));
+
+ ChunkedConversionSink startChunkedConversion(ChunkedConversionSink sink) {
+ return _first.startChunkedConversion(_second.startChunkedConversion(sink));
+ }
}
« no previous file with comments | « sdk/lib/convert/convert_sources.gypi ('k') | sdk/lib/convert/encoding.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698