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

Issue 16239: Add a method to explicitly request a UTF8 representation of a FilePath. This... (Closed)

Created:
12 years ago by Erik does not do reviews
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Add a method to explicitly request a UTF8 representation of a FilePath. This is for places where you need to use a FilePath in a non-filesystem context (for example, adding a file to an archive file, or constructing a file:// URL). Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=7423

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -0 lines) Patch
M base/file_path.h View 1 chunk +4 lines, -0 lines 0 comments Download
M base/file_path.cc View 1 chunk +9 lines, -0 lines 3 comments Download

Messages

Total messages: 5 (0 generated)
Erik does not do reviews
12 years ago (2008-12-23 18:27:55 UTC) #1
Avi (use Gerrit)
lgtm! I can think of a few place I could use something like this...
12 years ago (2008-12-23 18:35:45 UTC) #2
darin (slow to review)
http://codereview.chromium.org/16239/diff/1/2 File base/file_path.cc (right): http://codereview.chromium.org/16239/diff/1/2#newcode68 Line 68: // TODO(erikkay): I'm not sure how to make ...
12 years ago (2008-12-23 20:23:55 UTC) #3
Avi (use Gerrit)
http://codereview.chromium.org/16239/diff/1/2 File base/file_path.cc (right): http://codereview.chromium.org/16239/diff/1/2#newcode68 Line 68: // TODO(erikkay): I'm not sure how to make ...
12 years ago (2008-12-23 22:58:49 UTC) #4
Erik does not do reviews
12 years ago (2008-12-23 23:02:04 UTC) #5
http://codereview.chromium.org/16239/diff/1/2
File base/file_path.cc (right):

http://codereview.chromium.org/16239/diff/1/2#newcode68
Line 68: // TODO(erikkay): I'm not sure how to make this code always correct for
Linux.
On 2008/12/23 22:58:49, Avi wrote:
> On 2008/12/23 20:23:55, darin wrote:
> > why do we
> > need a UTF8Value accessor?
> 
> There are cases where we need to have the path in one format across all
> platforms. The example I just hit was converting to a WebCore::PluginInfo,
which
> takes a String.

Unfortunately, as Darin educated me here, this method can't actually work on
Linux.  Since from the Linux perspective, it doesn't actually know what the
filesystem encoding is for a given filename, asking it to convert to UTF8 is
nonsensical.  I'm about to revert this CL.

Powered by Google App Engine
This is Rietveld 408576698