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

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

Issue 2970273004: Deprecate all diagnostics methods that use strings. (Closed)
Patch Set: Merged with 4df146dd9a465d63344330bf3e45524b927c92ec Created 3 years, 5 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
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 'package:front_end/src/fasta/errors.dart' show defaultServerAddress; 11 import 'package:front_end/src/fasta/deprecated_problems.dart'
12 show defaultServerAddress;
12 13
13 badRequest(HttpRequest request, int status, String message) { 14 badRequest(HttpRequest request, int status, String message) {
14 request.response.statusCode = status; 15 request.response.statusCode = status;
15 request.response.write(''' 16 request.response.write('''
16 <!DOCTYPE html> 17 <!DOCTYPE html>
17 <html lang="en"> 18 <html lang="en">
18 <head> 19 <head>
19 <meta charset="utf-8"> 20 <meta charset="utf-8">
20 <title>$message</title> 21 <title>$message</title>
21 </head> 22 </head>
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 continue; 102 continue;
102 } 103 }
103 if (request.uri.path != "/") { 104 if (request.uri.path != "/") {
104 badRequest(request, HttpStatus.NOT_FOUND, "Not found."); 105 badRequest(request, HttpStatus.NOT_FOUND, "Not found.");
105 continue; 106 continue;
106 } 107 }
107 collectLog(new DateTime.now(), request); 108 collectLog(new DateTime.now(), request);
108 } 109 }
109 keepAlive.close(); 110 keepAlive.close();
110 } 111 }
OLDNEW
« no previous file with comments | « pkg/front_end/tool/_fasta/analyzer_compile.dart ('k') | pkg/kernel/test/closures_initializers/suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698