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

Unified Diff: utils/pub/curl_client.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
« no previous file with comments | « utils/pub/command_update.dart ('k') | utils/pub/entrypoint.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/curl_client.dart
diff --git a/utils/pub/curl_client.dart b/utils/pub/curl_client.dart
index 6922b828e0b6928f5d463aee71bd6897a74b2acb..7361b09abfc5b0d6bfbb6d6e5c33c1f7b0eebdd9 100644
--- a/utils/pub/curl_client.dart
+++ b/utils/pub/curl_client.dart
@@ -4,6 +4,7 @@
library curl_client;
+import 'dart:async';
import 'dart:io';
import '../../pkg/http/lib/http.dart' as http;
@@ -39,7 +40,7 @@ class CurlClient extends http.BaseClient {
var arguments = _argumentsForRequest(request, headerFile);
log.process(executable, arguments);
var process;
- return startProcess(executable, arguments).chain((process_) {
+ return startProcess(executable, arguments).then((process_) {
process = process_;
if (requestStream.closed) {
process.stdin.close();
@@ -48,8 +49,8 @@ class CurlClient extends http.BaseClient {
}
return _waitForHeaders(process, expectBody: request.method != "HEAD");
- }).chain((_) => new File(headerFile).readAsLines())
- .transform((lines) => _buildResponse(request, process, lines));
+ }).then((_) => new File(headerFile).readAsLines())
+ .then((lines) => _buildResponse(request, process, lines));
});
}
@@ -126,7 +127,7 @@ class CurlClient extends http.BaseClient {
}
chainToCompleter(consumeInputStream(process.stderr)
- .transform((stderrBytes) {
+ .then((stderrBytes) {
var message = new String.fromCharCodes(stderrBytes);
log.fine('Got error reading headers from curl: $message');
if (exitCode == 47) {
« no previous file with comments | « utils/pub/command_update.dart ('k') | utils/pub/entrypoint.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698