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

Unified Diff: utils/archive/reader.dart

Issue 11785028: Commit Martin's patch for pub + lib_v2. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. 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/archive/input_stream.dart ('k') | utils/pub/command_help.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/archive/reader.dart
diff --git a/utils/archive/reader.dart b/utils/archive/reader.dart
index 74760a53e986395b1c1dd4d74fc3ed51d115e1e6..c360674d2f219f1c505d843aeb21660b6344786b 100644
--- a/utils/archive/reader.dart
+++ b/utils/archive/reader.dart
@@ -57,7 +57,7 @@ class ArchiveReader {
*/
Future<ArchiveInputStream> openFilename(String file, [int block_size=16384]) {
var id;
- return _createArchive().chain((_id) {
+ return _createArchive().then((_id) {
id = _id;
return call(OPEN_FILENAME, id, [file, block_size]);
}).then((_) => new ArchiveInputStream(id));
@@ -66,7 +66,7 @@ class ArchiveReader {
/** Begins extracting from [data], which should be a list of bytes. */
Future<ArchiveInputStream> openData(List<int> data) {
var id;
- return _createArchive().chain((_id) {
+ return _createArchive().then((_id) {
id = _id;
return call(OPEN_MEMORY, id, [bytesForC(data)]);
}).then((_) => new ArchiveInputStream(id));
@@ -77,7 +77,7 @@ class ArchiveReader {
* returns its id.
*/
Future<int> _createArchive() {
- return call(NEW).chain((id) {
+ return call(NEW).then((id) {
if (id == 0 || id == null) {
throw new ArchiveException("Archive is invalid or closed.");
}
« no previous file with comments | « utils/archive/input_stream.dart ('k') | utils/pub/command_help.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698