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

Side by Side Diff: lib/src/util/path_handler.dart

Issue 1101773002: Add Windows support. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Unused import Created 5 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 unified diff | Download patch
« no previous file with comments | « lib/src/util/io.dart ('k') | test/io.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library test.util.path_handler; 5 library test.util.path_handler;
6 6
7 import 'package:path/path.dart' as p; 7 import 'package:path/path.dart' as p;
8 import 'package:shelf/shelf.dart' as shelf; 8 import 'package:shelf/shelf.dart' as shelf;
9 9
10 import '../utils.dart'; 10 import '../utils.dart';
(...skipping 29 matching lines...) Expand all
40 node = node.children[components[i]]; 40 node = node.children[components[i]];
41 if (node == null) break; 41 if (node == null) break;
42 if (node.handler == null) continue; 42 if (node.handler == null) continue;
43 handler = node.handler; 43 handler = node.handler;
44 handlerIndex = i; 44 handlerIndex = i;
45 } 45 }
46 46
47 if (handler == null) return new shelf.Response.notFound("Not found."); 47 if (handler == null) return new shelf.Response.notFound("Not found.");
48 48
49 return handler(shelfChange(request, 49 return handler(shelfChange(request,
50 path: p.joinAll(components.take(handlerIndex + 1)))); 50 path: p.url.joinAll(components.take(handlerIndex + 1))));
51 } 51 }
52 } 52 }
53 53
54 /// A trie node. 54 /// A trie node.
55 class _Node { 55 class _Node {
56 shelf.Handler handler; 56 shelf.Handler handler;
57 final children = new Map<String, _Node>(); 57 final children = new Map<String, _Node>();
58 } 58 }
OLDNEW
« no previous file with comments | « lib/src/util/io.dart ('k') | test/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698