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

Side by Side Diff: lib/src/utils.dart

Issue 1308163004: Async-ify. (Closed) Base URL: git@github.com:dart-lang/oauth2.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library utils; 5 library utils;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 /// Adds additional query parameters to [url], overwriting the original 9 /// Adds additional query parameters to [url], overwriting the original
10 /// parameters if a name conflict occurs. 10 /// parameters if a name conflict occurs.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 parameters[match.group(1).toLowerCase()] = match.group(2); 98 parameters[match.group(1).toLowerCase()] = match.group(2);
99 } while (match.group(3) != null); 99 } while (match.group(3) != null);
100 100
101 if (!paramString.trim().isEmpty) { 101 if (!paramString.trim().isEmpty) {
102 throw new FormatException('Invalid WWW-Authenticate header: "$header"'); 102 throw new FormatException('Invalid WWW-Authenticate header: "$header"');
103 } 103 }
104 104
105 return new AuthenticateHeader(scheme, parameters); 105 return new AuthenticateHeader(scheme, parameters);
106 } 106 }
107 } 107 }
108
109 /// Returns a [Future] that asynchronously completes to `null`.
110 Future get async => new Future.delayed(const Duration(milliseconds: 0),
111 () => null);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698