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

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

Issue 22284003: pkg: analysis aided cleanup (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nits Created 7 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 | Annotate | Revision Log
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 import 'dart:isolate';
9
10 import "package:crypto/crypto.dart";
11 8
12 /// Adds additional query parameters to [url], overwriting the original 9 /// Adds additional query parameters to [url], overwriting the original
13 /// parameters if a name conflict occurs. 10 /// parameters if a name conflict occurs.
14 Uri addQueryParameters(Uri url, Map<String, String> parameters) { 11 Uri addQueryParameters(Uri url, Map<String, String> parameters) {
15 var queryMap = queryToMap(url.query); 12 var queryMap = queryToMap(url.query);
16 queryMap.addAll(parameters); 13 queryMap.addAll(parameters);
17 return url.resolve("?${mapToQuery(queryMap)}"); 14 return url.resolve("?${mapToQuery(queryMap)}");
18 } 15 }
19 16
20 /// Convert a URL query string (or `application/x-www-form-urlencoded` body) 17 /// Convert a URL query string (or `application/x-www-form-urlencoded` body)
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 throw new FormatException('Invalid WWW-Authenticate header: "$header"'); 102 throw new FormatException('Invalid WWW-Authenticate header: "$header"');
106 } 103 }
107 104
108 return new AuthenticateHeader(scheme, parameters); 105 return new AuthenticateHeader(scheme, parameters);
109 } 106 }
110 } 107 }
111 108
112 /// Returns a [Future] that asynchronously completes to `null`. 109 /// Returns a [Future] that asynchronously completes to `null`.
113 Future get async => new Future.delayed(const Duration(milliseconds: 0), 110 Future get async => new Future.delayed(const Duration(milliseconds: 0),
114 () => null); 111 () => null);
OLDNEW
« no previous file with comments | « pkg/oauth2/lib/src/expiration_exception.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