Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.source.io; | 8 library engine.source.io; |
| 9 | 9 |
| 10 import 'engine.dart'; | 10 import 'engine.dart'; |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 190 } else if (scheme == DartUriResolver.DART_SCHEME) { | 190 } else if (scheme == DartUriResolver.DART_SCHEME) { |
| 191 return UriKind.DART_URI; | 191 return UriKind.DART_URI; |
| 192 } else if (scheme == FileUriResolver.FILE_SCHEME) { | 192 } else if (scheme == FileUriResolver.FILE_SCHEME) { |
| 193 return UriKind.FILE_URI; | 193 return UriKind.FILE_URI; |
| 194 } | 194 } |
| 195 return UriKind.FILE_URI; | 195 return UriKind.FILE_URI; |
| 196 } | 196 } |
| 197 | 197 |
| 198 @override | 198 @override |
| 199 bool operator ==(Object object) => | 199 bool operator ==(Object object) => |
| 200 object != null && object is FileBasedSource && file == object.file; | 200 object != null && object is FileBasedSource && uri == object.uri; |
|
scheglov
2015/02/19 18:54:47
The check object != null is not necessary, "is" wi
Paul Berry
2015/02/19 19:15:32
Fair enough. Fixed.
| |
| 201 | 201 |
| 202 @override | 202 @override |
| 203 bool exists() => file.isFile(); | 203 bool exists() => file.isFile(); |
| 204 | 204 |
| 205 @override | 205 @override |
| 206 Uri resolveRelativeUri(Uri containedUri) { | 206 Uri resolveRelativeUri(Uri containedUri) { |
| 207 try { | 207 try { |
| 208 Uri baseUri = uri; | 208 Uri baseUri = uri; |
| 209 bool isOpaque = uri.isAbsolute && !uri.path.startsWith('/'); | 209 bool isOpaque = uri.isAbsolute && !uri.path.startsWith('/'); |
| 210 if (isOpaque) { | 210 if (isOpaque) { |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 521 } | 521 } |
| 522 | 522 |
| 523 /** | 523 /** |
| 524 * Return `true` if the given URI is a `file` URI. | 524 * Return `true` if the given URI is a `file` URI. |
| 525 * | 525 * |
| 526 * @param uri the URI being tested | 526 * @param uri the URI being tested |
| 527 * @return `true` if the given URI is a `file` URI | 527 * @return `true` if the given URI is a `file` URI |
| 528 */ | 528 */ |
| 529 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; | 529 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; |
| 530 } | 530 } |
| OLD | NEW |