| OLD | NEW |
| 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 // VM implementation of Uri. | 5 // VM implementation of Uri. |
| 6 typedef Uri _UriBaseClosure(); | 6 typedef Uri _UriBaseClosure(); |
| 7 | 7 |
| 8 void _unsupportedUriBase() { | 8 Uri _unsupportedUriBase() { |
| 9 throw new UnsupportedError("'Uri.base' is not supported"); | 9 throw new UnsupportedError("'Uri.base' is not supported"); |
| 10 } | 10 } |
| 11 | 11 |
| 12 // _uriBaseClosure can be overwritten by the embedder to supply a different | 12 // _uriBaseClosure can be overwritten by the embedder to supply a different |
| 13 // value for Uri.base. | 13 // value for Uri.base. |
| 14 _UriBaseClosure _uriBaseClosure = _unsupportedUriBase; | 14 _UriBaseClosure _uriBaseClosure = _unsupportedUriBase; |
| 15 | 15 |
| 16 patch class Uri { | 16 patch class Uri { |
| 17 static final bool _isWindowsCached = _isWindowsPlatform; | 17 static final bool _isWindowsCached = _isWindowsPlatform; |
| 18 | 18 |
| 19 /* patch */ static bool get _isWindows => _isWindowsCached; | 19 /* patch */ static bool get _isWindows => _isWindowsCached; |
| 20 | 20 |
| 21 /* patch */ static Uri get base => _uriBaseClosure(); | 21 /* patch */ static Uri get base => _uriBaseClosure(); |
| 22 | 22 |
| 23 static bool get _isWindowsPlatform native "Uri_isWindowsPlatform"; | 23 static bool get _isWindowsPlatform native "Uri_isWindowsPlatform"; |
| 24 } | 24 } |
| OLD | NEW |