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

Side by Side Diff: pkg/front_end/tool/fasta/log_collector.dart

Issue 2722223006: Move all main methods to tool/. (Closed)
Patch Set: Update tools/patch_sdk.dart. Created 3 years, 9 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 | « pkg/front_end/tool/fasta/log_analyzer.dart ('k') | pkg/front_end/tool/fasta/outline.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'dart:convert' show JSON, UTF8; 5 import 'dart:convert' show JSON, UTF8;
6 6
7 import 'dart:isolate' show RawReceivePort; 7 import 'dart:isolate' show RawReceivePort;
8 8
9 import 'dart:io'; 9 import 'dart:io';
10 10
11 import '../errors.dart' show defaultServerAddress; 11 import 'package:front_end/src/fasta/errors.dart' show defaultServerAddress;
12 12
13 badRequest(HttpRequest request, int status, String message) { 13 badRequest(HttpRequest request, int status, String message) {
14 request.response.statusCode = status; 14 request.response.statusCode = status;
15 request.response.write(''' 15 request.response.write('''
16 <!DOCTYPE html> 16 <!DOCTYPE html>
17 <html lang="en"> 17 <html lang="en">
18 <head> 18 <head>
19 <meta charset="utf-8"> 19 <meta charset="utf-8">
20 <title>$message</title> 20 <title>$message</title>
21 </head> 21 </head>
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 continue; 101 continue;
102 } 102 }
103 if (request.uri.path != "/") { 103 if (request.uri.path != "/") {
104 badRequest(request, HttpStatus.NOT_FOUND, "Not found."); 104 badRequest(request, HttpStatus.NOT_FOUND, "Not found.");
105 continue; 105 continue;
106 } 106 }
107 collectLog(new DateTime.now(), request); 107 collectLog(new DateTime.now(), request);
108 } 108 }
109 keepAlive.close(); 109 keepAlive.close();
110 } 110 }
OLDNEW
« no previous file with comments | « pkg/front_end/tool/fasta/log_analyzer.dart ('k') | pkg/front_end/tool/fasta/outline.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698