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

Unified Diff: pkg/scheduled_test/lib/src/value_future.dart

Issue 812253002: Delete a bunch of packages that are now on GitHub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Un-delete http Created 6 years 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 | « pkg/scheduled_test/lib/src/utils.dart ('k') | pkg/scheduled_test/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/scheduled_test/lib/src/value_future.dart
diff --git a/pkg/scheduled_test/lib/src/value_future.dart b/pkg/scheduled_test/lib/src/value_future.dart
deleted file mode 100644
index b0d458b9df90dd1cabd92a17ba7eb96366392298..0000000000000000000000000000000000000000
--- a/pkg/scheduled_test/lib/src/value_future.dart
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library value_future;
-
-import 'dart:async';
-
-/// A [Future] wrapper that provides synchronous access to the value of the
-/// wrapped [Future] once it's completed.
-class ValueFuture<T> implements Future<T> {
- /// The wrapped [Future].
- Future<T> _future;
-
- /// The [value] of the wrapped [Future], if it's completed succesfully. If it
- /// hasn't completed yet or has completed with an error, this will be `null`.
- T get value => _value;
- T _value;
-
- /// Whether the wrapped [Future] has completed successfully.
- bool get hasValue => _hasValue;
- var _hasValue = false;
-
- ValueFuture(Future<T> future) {
- _future = future.then((value) {
- _value = value;
- _hasValue = true;
- return value;
- });
- }
-
- Stream<T> asStream() => _future.asStream();
- Future catchError(Function onError, {bool test(error)}) =>
- _future.catchError(onError, test: test);
- Future then(onValue(T value), {Function onError}) =>
- _future.then(onValue, onError: onError);
- Future<T> whenComplete(action()) => _future.whenComplete(action);
- Future timeout(Duration timeLimit, {void onTimeout()}) =>
- _future.timeout(timeLimit, onTimeout: onTimeout);
-}
« no previous file with comments | « pkg/scheduled_test/lib/src/utils.dart ('k') | pkg/scheduled_test/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698