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

Unified Diff: pkg/oauth2/lib/src/authorization_code_grant.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
« no previous file with comments | « pkg/intl/tool/generate_locale_data_files.dart ('k') | pkg/oauth2/lib/src/client.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/oauth2/lib/src/authorization_code_grant.dart
diff --git a/pkg/oauth2/lib/src/authorization_code_grant.dart b/pkg/oauth2/lib/src/authorization_code_grant.dart
index dcb36d06f3d076c66f52334ceb330660b6f88a67..5e9cbd2f6a13a822308bcd11301ff28d476fe375 100644
--- a/pkg/oauth2/lib/src/authorization_code_grant.dart
+++ b/pkg/oauth2/lib/src/authorization_code_grant.dart
@@ -4,6 +4,7 @@
library authorization_code_grant;
+import 'dart:async';
import 'dart:uri';
// TODO(nweiz): This should be a "package:" import. See issue 6745.
@@ -159,7 +160,7 @@ class AuthorizationCodeGrant {
///
/// Throws [AuthorizationException] if the authorization fails.
Future<Client> handleAuthorizationResponse(Map<String, String> parameters) {
- return async.chain((_) {
+ return async.then((_) {
if (_state == _INITIAL_STATE) {
throw new StateError(
'The authorization URL has not yet been generated.');
@@ -211,7 +212,7 @@ class AuthorizationCodeGrant {
///
/// Throws [AuthorizationException] if the authorization fails.
Future<Client> handleAuthorizationCode(String authorizationCode) {
- return async.chain((_) {
+ return async.then((_) {
if (_state == _INITIAL_STATE) {
throw new StateError(
'The authorization URL has not yet been generated.');
@@ -238,7 +239,7 @@ class AuthorizationCodeGrant {
// it be configurable?
"client_id": this.identifier,
"client_secret": this.secret
- }).transform((response) {
+ }).then((response) {
var credentials = handleAccessTokenResponse(
response, tokenEndpoint, startTime, _scopes);
return new Client(
« no previous file with comments | « pkg/intl/tool/generate_locale_data_files.dart ('k') | pkg/oauth2/lib/src/client.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698