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

Unified Diff: pkg/oauth2/lib/src/client.dart

Issue 14070010: Refactor Future constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added co19 issue number. Created 7 years, 8 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 | « pkg/intl/lib/intl_standalone.dart ('k') | pkg/oauth2/test/authorization_code_grant_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/oauth2/lib/src/client.dart
diff --git a/pkg/oauth2/lib/src/client.dart b/pkg/oauth2/lib/src/client.dart
index 0d422afd52fbddb0aaf29bffa254c0d2f2b92f5d..ec8dda5f2f9eca867d19b8afb34e54654343503f 100644
--- a/pkg/oauth2/lib/src/client.dart
+++ b/pkg/oauth2/lib/src/client.dart
@@ -83,7 +83,7 @@ class Client extends http.BaseClient {
/// the request if necessary.
Future<http.StreamedResponse> send(http.BaseRequest request) {
return async.then((_) {
- if (!credentials.isExpired) return new Future.immediate(null);
+ if (!credentials.isExpired) return new Future.value();
if (!credentials.canRefresh) throw new ExpirationException(credentials);
return refreshCredentials();
}).then((_) {
« no previous file with comments | « pkg/intl/lib/intl_standalone.dart ('k') | pkg/oauth2/test/authorization_code_grant_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698