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

Unified Diff: pkg/oauth2/lib/src/utils.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
Index: pkg/oauth2/lib/src/utils.dart
diff --git a/pkg/oauth2/lib/src/utils.dart b/pkg/oauth2/lib/src/utils.dart
index 59428b3c6fa906927c3f067df2f736c619467b9a..eb57e56260ecbf587ab1db57ed3af678e650f665 100644
--- a/pkg/oauth2/lib/src/utils.dart
+++ b/pkg/oauth2/lib/src/utils.dart
@@ -4,6 +4,7 @@
library utils;
+import 'dart:async';
import 'dart:uri';
import 'dart:isolate';
import 'dart:crypto';
@@ -38,7 +39,7 @@ String mapToQuery(Map<String, String> map) {
value = (value == null || value.isEmpty) ? null : encodeUriComponent(value);
pairs.add([key, value]);
});
- return Strings.join(pairs.map((pair) {
+ return Strings.join(pairs.mappedBy((pair) {
if (pair[1] == null) return pair[0];
return "${pair[0]}=${pair[1]}";
}), "&");
@@ -112,8 +113,4 @@ class AuthenticateHeader {
}
/// Returns a [Future] that asynchronously completes to `null`.
-Future get async {
- var completer = new Completer();
- new Timer(0, (_) => completer.complete(null));
- return completer.future;
-}
+Future get async => new Future.delayed(0, () => null);
« no previous file with comments | « pkg/oauth2/lib/src/handle_access_token_response.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