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

Side by Side Diff: tools/dom/src/_HttpRequestUtils.dart

Issue 2827793002: Format all files under tools and utils directory. (Closed)
Patch Set: Format all files under tools and utils directory. Created 3 years, 8 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
« no previous file with comments | « tools/dom/src/WrappedList.dart ('k') | tools/dom/src/_ListIterators.dart » ('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 part of html; 5 part of html;
6 6
7 class _HttpRequestUtils { 7 class _HttpRequestUtils {
8
9 // Helper for factory HttpRequest.get 8 // Helper for factory HttpRequest.get
10 static HttpRequest get(String url, 9 static HttpRequest get(
11 onComplete(HttpRequest request), 10 String url, onComplete(HttpRequest request), bool withCredentials) {
12 bool withCredentials) {
13 final request = new HttpRequest(); 11 final request = new HttpRequest();
14 request.open('GET', url, async: true); 12 request.open('GET', url, async: true);
15 13
16 request.withCredentials = withCredentials; 14 request.withCredentials = withCredentials;
17 15
18 request.onReadyStateChange.listen((e) { 16 request.onReadyStateChange.listen((e) {
19 if (request.readyState == HttpRequest.DONE) { 17 if (request.readyState == HttpRequest.DONE) {
20 onComplete(request); 18 onComplete(request);
21 } 19 }
22 }); 20 });
23 21
24 request.send(); 22 request.send();
25 23
26 return request; 24 return request;
27 } 25 }
28 } 26 }
OLDNEW
« no previous file with comments | « tools/dom/src/WrappedList.dart ('k') | tools/dom/src/_ListIterators.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698