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

Unified Diff: tools/dartium/download_file.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 side-by-side diff with in-line comments
Download patch
Index: tools/dartium/download_file.dart
diff --git a/tools/dartium/download_file.dart b/tools/dartium/download_file.dart
index 6339ae88ade94d5788cb6585d0f0a896573c0c4c..972141217e5bc568c35dde8cff4b52d2a442aa71 100644
--- a/tools/dartium/download_file.dart
+++ b/tools/dartium/download_file.dart
@@ -7,16 +7,17 @@ import 'dart:io';
Future downloadFile(Uri url, String destination) {
var client = new HttpClient();
- return client.getUrl(url)
- .then((HttpClientRequest request) => request.close())
- .then((HttpClientResponse response) {
- if (response.statusCode != HttpStatus.OK) {
- throw new Exception("Http status code (${response.statusCode}) "
- "was not 200. Aborting.");
- }
- var sink = new File(destination).openWrite();
- return response.pipe(sink).then((_) {
- client.close();
+ return client
+ .getUrl(url)
+ .then((HttpClientRequest request) => request.close())
+ .then((HttpClientResponse response) {
+ if (response.statusCode != HttpStatus.OK) {
+ throw new Exception("Http status code (${response.statusCode}) "
+ "was not 200. Aborting.");
+ }
+ var sink = new File(destination).openWrite();
+ return response.pipe(sink).then((_) {
+ client.close();
});
});
}
« no previous file with comments | « tools/dart2js/sourceMapViewer/web/display.dart ('k') | tools/dartium/generate_app/generate_cached_patches.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698