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

Side by Side Diff: pkg/http/lib/src/io_client.dart

Issue 11865005: Remove Futures class, move methods to Future. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/http/lib/src/multipart_request.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library io_client; 5 library io_client;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'base_client.dart'; 10 import 'base_client.dart';
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 wrapInputStream(response.inputStream), 66 wrapInputStream(response.inputStream),
67 response.statusCode, 67 response.statusCode,
68 response.contentLength, 68 response.contentLength,
69 request: request, 69 request: request,
70 headers: headers, 70 headers: headers,
71 isRedirect: response.isRedirect, 71 isRedirect: response.isRedirect,
72 persistentConnection: response.persistentConnection, 72 persistentConnection: response.persistentConnection,
73 reasonPhrase: response.reasonPhrase)); 73 reasonPhrase: response.reasonPhrase));
74 }; 74 };
75 75
76 return new Future.wait([ 76 return Future.wait([
77 completer.future, 77 completer.future,
78 pipeCompleter.future 78 pipeCompleter.future
79 ]).then((values) => values.first); 79 ]).then((values) => values.first);
80 } 80 }
81 81
82 /// Closes the client. This terminates all active connections. If a client 82 /// Closes the client. This terminates all active connections. If a client
83 /// remains unclosed, the Dart process may not terminate. 83 /// remains unclosed, the Dart process may not terminate.
84 void close() { 84 void close() {
85 if (_inner != null) _inner.shutdown(force: true); 85 if (_inner != null) _inner.shutdown(force: true);
86 _inner = null; 86 _inner = null;
87 } 87 }
88 } 88 }
OLDNEW
« no previous file with comments | « no previous file | pkg/http/lib/src/multipart_request.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698