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

Side by Side Diff: sdk/lib/io/platform_impl.dart

Issue 426643002: Don't resolve 'package:*' and 'dart:*' Uris, in Platform:script. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of dart.io; 5 part of dart.io;
6 6
7 class _Platform { 7 class _Platform {
8 external static int _numberOfProcessors(); 8 external static int _numberOfProcessors();
9 external static String _pathSeparator(); 9 external static String _pathSeparator();
10 external static String _operatingSystem(); 10 external static String _operatingSystem();
(...skipping 13 matching lines...) Expand all
24 24
25 static int get numberOfProcessors => _numberOfProcessors(); 25 static int get numberOfProcessors => _numberOfProcessors();
26 static String get pathSeparator => _pathSeparator(); 26 static String get pathSeparator => _pathSeparator();
27 static String get operatingSystem => _operatingSystem(); 27 static String get operatingSystem => _operatingSystem();
28 static Uri script; 28 static Uri script;
29 29
30 // This script singleton is written to by the embedder if applicable. 30 // This script singleton is written to by the embedder if applicable.
31 static void set _nativeScript(String path) { 31 static void set _nativeScript(String path) {
32 if (path.startsWith('http:') || 32 if (path.startsWith('http:') ||
33 path.startsWith('https:') || 33 path.startsWith('https:') ||
34 path.startsWith('package:') ||
35 path.startsWith('dart:') ||
34 path.startsWith('file:')) { 36 path.startsWith('file:')) {
35 script = Uri.parse(path); 37 script = Uri.parse(path);
36 } else { 38 } else {
37 script = Uri.base.resolveUri(new Uri.file(path)); 39 script = Uri.base.resolveUri(new Uri.file(path));
38 } 40 }
39 } 41 }
40 42
41 static String get localHostname { 43 static String get localHostname {
42 var result = _localHostname(); 44 var result = _localHostname();
43 if (result is OSError) { 45 if (result is OSError) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 V remove(String key) => _map.remove(key.toUpperCase()); 109 V remove(String key) => _map.remove(key.toUpperCase());
108 void clear() => _map.clear(); 110 void clear() => _map.clear();
109 void forEach(void f(String key, V value)) => _map.forEach(f); 111 void forEach(void f(String key, V value)) => _map.forEach(f);
110 Iterable<String> get keys => _map.keys; 112 Iterable<String> get keys => _map.keys;
111 Iterable<V> get values => _map.values; 113 Iterable<V> get values => _map.values;
112 int get length => _map.length; 114 int get length => _map.length;
113 bool get isEmpty => _map.isEmpty; 115 bool get isEmpty => _map.isEmpty;
114 bool get isNotEmpty => _map.isNotEmpty; 116 bool get isNotEmpty => _map.isNotEmpty;
115 String toString() => _map.toString(); 117 String toString() => _map.toString();
116 } 118 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698