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

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

Issue 15820008: Remove library dart:crypto (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 7 years, 6 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
« no previous file with comments | « pkg/http/lib/src/utils.dart ('k') | runtime/vm/benchmark_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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'; 8 import 'dart:isolate';
9 import 'dart:crypto'; 9
10 import "package:crypto/crypto.dart";
10 11
11 /// Adds additional query parameters to [url], overwriting the original 12 /// Adds additional query parameters to [url], overwriting the original
12 /// parameters if a name conflict occurs. 13 /// parameters if a name conflict occurs.
13 Uri addQueryParameters(Uri url, Map<String, String> parameters) { 14 Uri addQueryParameters(Uri url, Map<String, String> parameters) {
14 var queryMap = queryToMap(url.query); 15 var queryMap = queryToMap(url.query);
15 mapAddAll(queryMap, parameters); 16 mapAddAll(queryMap, parameters);
16 return url.resolve("?${mapToQuery(queryMap)}"); 17 return url.resolve("?${mapToQuery(queryMap)}");
17 } 18 }
18 19
19 /// Convert a URL query string (or `application/x-www-form-urlencoded` body) 20 /// Convert a URL query string (or `application/x-www-form-urlencoded` body)
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 throw new FormatException('Invalid WWW-Authenticate header: "$header"'); 110 throw new FormatException('Invalid WWW-Authenticate header: "$header"');
110 } 111 }
111 112
112 return new AuthenticateHeader(scheme, parameters); 113 return new AuthenticateHeader(scheme, parameters);
113 } 114 }
114 } 115 }
115 116
116 /// Returns a [Future] that asynchronously completes to `null`. 117 /// Returns a [Future] that asynchronously completes to `null`.
117 Future get async => new Future.delayed(const Duration(milliseconds: 0), 118 Future get async => new Future.delayed(const Duration(milliseconds: 0),
118 () => null); 119 () => null);
OLDNEW
« no previous file with comments | « pkg/http/lib/src/utils.dart ('k') | runtime/vm/benchmark_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698