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

Side by Side Diff: editor/tools/plugins/com.google.dart.tools.core_test/src-dart/pub_package_server.dart

Issue 23596007: Remove usage of dart:json. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 /// Runs a HTTP server on localhost that mimics the behavoir of pub.dartlang.org 5 /// Runs a HTTP server on localhost that mimics the behavoir of pub.dartlang.org
6 /// and serves files on pub requests. Files to be stored are on disk in the file 6 /// and serves files on pub requests. Files to be stored are on disk in the file
7 /// system. 7 /// system.
8 /// 8 ///
9 /// The port for the server and the base directory of the data to be served 9 /// The port for the server and the base directory of the data to be served
10 /// should be passed in as arguments 10 /// should be passed in as arguments
11 11
12 library pub_package_server; 12 library pub_package_server;
13 13
14 import 'dart:async'; 14 import 'dart:async';
15 import 'dart:io'; 15 import 'dart:io';
16 import 'dart:json' as json;
17 16
18 const LOG_REQUESTS = true; 17 const LOG_REQUESTS = true;
19 18
20 String baseDir; 19 String baseDir;
21 20
22 main() { 21 main() {
23 int port; 22 int port;
24 var options = new Options().arguments; 23 var options = new Options().arguments;
25 if (options.length != 1) { 24 if (options.length != 1) {
26 print('Insufficient arguments \npub_package_server serverDataLocation'); 25 print('Insufficient arguments \npub_package_server serverDataLocation');
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 response.close(); 65 response.close();
67 }); 66 });
68 } catch (e) { 67 } catch (e) {
69 print(e); 68 print(e);
70 response.statusCode = 500; 69 response.statusCode = 500;
71 response.close(); 70 response.close();
72 return; 71 return;
73 } 72 }
74 } 73 }
75 74
OLDNEW
« no previous file with comments | « no previous file | pkg/docgen/lib/docgen.dart » ('j') | samples/third_party/dromaeo/tests/dom-modify-html.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698