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

Unified Diff: tool/input_sdk/lib/convert/converter.dart

Issue 1965563003: Update dart:convert and dart:core Uri. (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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: tool/input_sdk/lib/convert/converter.dart
diff --git a/tool/input_sdk/lib/convert/converter.dart b/tool/input_sdk/lib/convert/converter.dart
index bce2aab472e403d1b7e634eb6ef67e31630191f8..d6d9a9b78bf2f83d29925a8a7f13d9cbd826d8d5 100644
--- a/tool/input_sdk/lib/convert/converter.dart
+++ b/tool/input_sdk/lib/convert/converter.dart
@@ -10,7 +10,7 @@ part of dart.convert;
* It is recommended that implementations of `Converter` extend this class,
* to inherit any further methods that may be added to the class.
*/
-abstract class Converter<S, T> implements StreamTransformer<S, T> {
+abstract class Converter<S, T> implements StreamTransformer {
const Converter();
/**
@@ -29,17 +29,25 @@ abstract class Converter<S, T> implements StreamTransformer<S, T> {
}
/**
- * Starts a chunked conversion.
+ * Deprecated.
+ *
+ * Use the [ChunkedConverter] interface instead.
*/
- ChunkedConversionSink startChunkedConversion(Sink<T> sink) {
+ @deprecated
+ ChunkedConversionSink startChunkedConversion(Sink sink) {
throw new UnsupportedError(
"This converter does not support chunked conversions: $this");
}
- // Subclasses are encouraged to provide better types.
- Stream<T> bind(Stream<S> source) {
+ /**
+ * Deprecated.
+ *
+ * Use the [ChunkedConverter] interface instead.
+ */
+ @deprecated
+ Stream bind(Stream stream) {
return new Stream.eventTransformed(
- source,
+ stream,
(EventSink sink) => new _ConverterStreamEventSink(this, sink));
}
}
@@ -50,14 +58,10 @@ abstract class Converter<S, T> implements StreamTransformer<S, T> {
* For a non-chunked conversion converts the input in sequence.
*/
class _FusedConverter<S, M, T> extends Converter<S, T> {
- final Converter _first;
- final Converter _second;
+ final Converter<S, M> _first;
+ final Converter<M, T> _second;
_FusedConverter(this._first, this._second);
T convert(S input) => _second.convert(_first.convert(input));
-
- ChunkedConversionSink startChunkedConversion(Sink<T> sink) {
- return _first.startChunkedConversion(_second.startChunkedConversion(sink));
- }
}

Powered by Google App Engine
This is Rietveld 408576698