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

Unified Diff: pkg/front_end/lib/src/fasta/bin/log_collector.dart

Issue 2718113003: Run dartfmt on pkg/front_end/lib. (Closed)
Patch Set: Rerun after merging. Created 3 years, 10 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
« no previous file with comments | « pkg/front_end/lib/src/fasta/bin/log_analyzer.dart ('k') | pkg/front_end/lib/src/fasta/bin/run.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/bin/log_collector.dart
diff --git a/pkg/front_end/lib/src/fasta/bin/log_collector.dart b/pkg/front_end/lib/src/fasta/bin/log_collector.dart
index 50d4a76dc8a41f8e282df2356d77e719766fc3cd..3e07606bd945600c89350db8312a9e483f4d4836 100644
--- a/pkg/front_end/lib/src/fasta/bin/log_collector.dart
+++ b/pkg/front_end/lib/src/fasta/bin/log_collector.dart
@@ -2,17 +2,13 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-import 'dart:convert' show
- JSON,
- UTF8;
+import 'dart:convert' show JSON, UTF8;
-import 'dart:isolate' show
- RawReceivePort;
+import 'dart:isolate' show RawReceivePort;
import 'dart:io';
-import 'package:front_end/src/fasta/errors.dart' show
- defaultServerAddress;
+import 'package:front_end/src/fasta/errors.dart' show defaultServerAddress;
badRequest(HttpRequest request, int status, String message) {
request.response.statusCode = status;
@@ -41,12 +37,12 @@ collectLog(DateTime time, HttpRequest request) async {
data = JSON.decode(json);
} on FormatException catch (e) {
print(e);
- return badRequest(request, HttpStatus.BAD_REQUEST,
- "Malformed JSON data: ${e.message}.");
+ return badRequest(
+ request, HttpStatus.BAD_REQUEST, "Malformed JSON data: ${e.message}.");
}
if (data is! Map) {
- return badRequest(request, HttpStatus.BAD_REQUEST,
- "Malformed JSON data: not a map.");
+ return badRequest(
+ request, HttpStatus.BAD_REQUEST, "Malformed JSON data: not a map.");
}
if (data["type"] != "crash") {
return badRequest(request, HttpStatus.BAD_REQUEST,
@@ -57,8 +53,8 @@ collectLog(DateTime time, HttpRequest request) async {
String month = "${time.month}".padLeft(2, "0");
String day = "${time.day}".padLeft(2, "0");
String us = "${time.microsecondsSinceEpoch}".padLeft(19, '0');
- Uri uri = Uri.base.resolve(
- "crash_logs/${data['client']}/$year-$month-$day/$us.log");
+ Uri uri = Uri.base
+ .resolve("crash_logs/${data['client']}/$year-$month-$day/$us.log");
File file = new File.fromUri(uri);
await file.parent.create(recursive: true);
await file.writeAsString(json);
« no previous file with comments | « pkg/front_end/lib/src/fasta/bin/log_analyzer.dart ('k') | pkg/front_end/lib/src/fasta/bin/run.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698