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

Issue 21039005: Add support for file URIs and extracting the file path from file URIs (Closed)

Created:
7 years, 4 months ago by Søren Gjesse
Modified:
7 years, 4 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add support for file URIs and extracting the file path from file URIs A file URI can now be created directly using the constructor Uri.file. The file path for a file URI can now be extracted using the toFilePath() method. The path strings involved use either Windows or non-Windows semantics. Both the Uri.file constructor and the toFilePath() method have optional anamed arguments for specifying the semantics. The default semantic is determined from the platform Dart is running on. R=ahe@google.com, whesse@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=25872

Patch Set 1 #

Patch Set 2 : Style fix #

Total comments: 58

Patch Set 3 : Addressed first round of review comments #

Total comments: 36

Patch Set 4 : Addressed second round of review comments #

Patch Set 5 : Changed windowsPath to windows #

Patch Set 6 : Rebased to r25869 #

Patch Set 7 : Fix due to issue 12290 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+640 lines, -8 lines) Patch
M runtime/lib/corelib_sources.gypi View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
A + runtime/lib/uri.cc View 1 2 1 chunk +10 lines, -8 lines 0 comments Download
A runtime/lib/uri_patch.dart View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/lib/core_patch.dart View 3 1 chunk +4 lines, -0 lines 0 comments Download
M sdk/lib/core/uri.dart View 1 2 3 4 5 6 3 chunks +299 lines, -0 lines 0 comments Download
A tests/corelib/uri_file_test.dart View 1 2 3 4 1 chunk +273 lines, -0 lines 0 comments Download
A tests/standalone/io/uri_platform_test.dart View 1 2 1 chunk +39 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Søren Gjesse
7 years, 4 months ago (2013-07-29 14:57:04 UTC) #1
floitsch
dbc. https://codereview.chromium.org/21039005/diff/3001/sdk/lib/core/uri.dart File sdk/lib/core/uri.dart (right): https://codereview.chromium.org/21039005/diff/3001/sdk/lib/core/uri.dart#newcode290 sdk/lib/core/uri.dart:290: */ Give some examples. https://codereview.chromium.org/21039005/diff/3001/sdk/lib/core/uri.dart#newcode291 sdk/lib/core/uri.dart:291: factory Uri.file(String ...
7 years, 4 months ago (2013-07-29 15:16:54 UTC) #2
ahe
Generally, this is very nice. However, I'm concerned about not accepting forward-slashes on Windows. See: ...
7 years, 4 months ago (2013-07-29 15:30:15 UTC) #3
Bill Hesse
https://codereview.chromium.org/21039005/diff/3001/sdk/lib/core/uri.dart File sdk/lib/core/uri.dart (right): https://codereview.chromium.org/21039005/diff/3001/sdk/lib/core/uri.dart#newcode271 sdk/lib/core/uri.dart:271: * semantics. For Windows semantics the backslash separator is ...
7 years, 4 months ago (2013-07-30 11:29:32 UTC) #4
Søren Gjesse
PTAL Addressed all comments. Added windows semantics support for paths starting with \\?\. Please consider: ...
7 years, 4 months ago (2013-07-30 13:41:26 UTC) #5
Bill Hesse
https://codereview.chromium.org/21039005/diff/3001/sdk/lib/core/uri.dart File sdk/lib/core/uri.dart (right): https://codereview.chromium.org/21039005/diff/3001/sdk/lib/core/uri.dart#newcode291 sdk/lib/core/uri.dart:291: factory Uri.file(String path, {bool windowsPath}) { On 2013/07/30 13:41:26, ...
7 years, 4 months ago (2013-07-30 15:03:15 UTC) #6
ahe
lgtm https://codereview.chromium.org/21039005/diff/11001/runtime/lib/uri_patch.dart File runtime/lib/uri_patch.dart (right): https://codereview.chromium.org/21039005/diff/11001/runtime/lib/uri_patch.dart#newcode4 runtime/lib/uri_patch.dart:4: // Dart core library. Remove this line? https://codereview.chromium.org/21039005/diff/11001/sdk/lib/core/uri.dart ...
7 years, 4 months ago (2013-08-06 14:14:29 UTC) #7
Bill Hesse
lgtm
7 years, 4 months ago (2013-08-07 08:59:30 UTC) #8
Søren Gjesse
Thanks for the review! Committing with one additional change the windowsPath optional boolean argument will ...
7 years, 4 months ago (2013-08-07 12:08:00 UTC) #9
Søren Gjesse
7 years, 4 months ago (2013-08-07 12:55:18 UTC) #10
Message was sent while issue was closed.
Committed patchset #7 manually as r25872 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698