[dart:io] Switch ProcessStartMode back to an enum
Switching ProcessStartMode back to an enum due to problems with
package:process (https://github.com/google/process.dart/blob/master/lib/src/record_replay/run_manifest_entry.dart#L11)
Change-Id: I7db55a6a2107c9469d264e0539844363d729e0bf
Reviewed-on: https://dart-review.googlesource.com/54063
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
diff --git a/sdk/lib/io/data_transformer.dart b/sdk/lib/io/data_transformer.dart
index b8f084e..ab0770b 100644
--- a/sdk/lib/io/data_transformer.dart
+++ b/sdk/lib/io/data_transformer.dart
@@ -70,13 +70,13 @@
/// Use this strategy to limit match distances to one (run-length encoding)
static const int strategyRle = 3;
- @Deprecated("Use StrategyRle instead")
+ @Deprecated("Use strategyRle instead")
static const int STRATEGY_RLE = 3;
/// This strategy prevents the use of dynamic Huffman codes, allowing for a
/// simpler decoder
static const int strategyFixed = 4;
- @Deprecated("Use StrategyFixed instead")
+ @Deprecated("Use strategyFixed instead")
static const int STRATEGY_FIXED = 4;
/// Recommended strategy for normal data
diff --git a/sdk/lib/io/process.dart b/sdk/lib/io/process.dart
index c7b18aa..e1d4c23 100644
--- a/sdk/lib/io/process.dart
+++ b/sdk/lib/io/process.dart
@@ -159,6 +159,15 @@
@Deprecated("Use detachedWithStdio instead")
static const DETACHED_WITH_STDIO = detachedWithStdio;
+ List<ProcessStartMode> get values => const <ProcessStartMode>[
+ normal,
+ inheritStdio,
+ detached,
+ detachedWithStdio
+ ];
+ String toString() =>
+ const ["normal", "inheritStdio", "detached", "detachedWithStdio"][_mode];
+
final int _mode;
const ProcessStartMode._internal(this._mode);
}