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

Unified Diff: runtime/bin/process.dart

Issue 10938010: Switch from interfaces to abstract classes in dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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: runtime/bin/process.dart
diff --git a/runtime/bin/process.dart b/runtime/bin/process.dart
index c699670a291105a21818924f5e1f7cc0f798c347..9cb3bfdd2bbc9ccd6c73990dfec719f0e718ace9 100644
--- a/runtime/bin/process.dart
+++ b/runtime/bin/process.dart
@@ -32,7 +32,7 @@ class Process {
*/
static Process start(String executable,
List<String> arguments,
- [ProcessOptions options]) {
+ [ProcessOptions options = null]) {
Søren Gjesse 2012/09/18 09:34:16 Isn't null the default default value for optional
Mads Ager (google) 2012/09/18 10:46:39 Yes, it is redundant. Removed.
return new _Process.start(executable, arguments, options);
}
@@ -49,7 +49,7 @@ class Process {
*/
static Future<ProcessResult> run(String executable,
List<String> arguments,
- [ProcessOptions options]) {
+ [ProcessOptions options = null]) {
Søren Gjesse 2012/09/18 09:34:16 "= null" needed?
Mads Ager (google) 2012/09/18 10:46:39 Done.
return _Process.run(executable, arguments, options);
}
@@ -106,7 +106,7 @@ class Process {
* of calling [kill] [onExit] is called. If the kill operation fails,
* [onError] is called.
*/
- abstract void kill([ProcessSignal signal]);
+ abstract void kill([ProcessSignal signal = ProcessSignal.SIGTERM]);
/**
* Terminates the streams of a process. [close] must be called on a
@@ -125,7 +125,7 @@ class Process {
* [ProcessResult] represents the result of running a non-interactive
* process started with [:Process.run:].
*/
-interface ProcessResult {
+abstract class ProcessResult {
/**
* Exit code for the process.
*/
@@ -229,7 +229,7 @@ class ProcessSignal {
class ProcessException implements Exception {
- const ProcessException([String this.message, int this.errorCode = 0]);
+ const ProcessException([String this.message = "", int this.errorCode = 0]);
String toString() => "ProcessException: $message ($errorCode)";
/**

Powered by Google App Engine
This is Rietveld 408576698