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

Issue 18134: Add AppendASCII (Closed)

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

Description

Adds AppendASCII which will append an ASCII path component. Since this is safe to do on all platform path encodings (even Linux), this allows path components to be taken from ASCII sources without #ifdefs for the caller. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=8394

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : '' #

Total comments: 8

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 2

Patch Set 6 : '' #

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -1 line) Patch
M base/file_path.h View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
M base/file_path.cc View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download
M base/file_path_unittest.cc View 1 2 3 4 5 2 chunks +12 lines, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Erik does not do reviews
11 years, 11 months ago (2009-01-16 01:11:05 UTC) #1
Mark Mentovai
http://codereview.chromium.org/18134/diff/6/208 File base/file_path.h (right): http://codereview.chromium.org/18134/diff/6/208#newcode193 Line 193: // be able to handle UTF-8 strings transparently ...
11 years, 11 months ago (2009-01-16 01:38:46 UTC) #2
Erik does not do reviews
On 2009/01/16 01:38:46, Mark Mentovai wrote: > http://codereview.chromium.org/18134/diff/6/208 > File base/file_path.h (right): > > http://codereview.chromium.org/18134/diff/6/208#newcode193 ...
11 years, 11 months ago (2009-01-20 23:04:47 UTC) #3
darin (slow to review)
http://codereview.chromium.org/18134/diff/210/10 File base/file_path.cc (right): http://codereview.chromium.org/18134/diff/210/10#newcode256 Line 256: if (!IsStringASCII(component)) maybe this should just be a ...
11 years, 11 months ago (2009-01-20 23:09:39 UTC) #4
Erik does not do reviews
http://codereview.chromium.org/18134/diff/210/10 File base/file_path.cc (right): http://codereview.chromium.org/18134/diff/210/10#newcode256 Line 256: if (!IsStringASCII(component)) On 2009/01/20 23:09:39, darin wrote: > ...
11 years, 11 months ago (2009-01-20 23:13:24 UTC) #5
Mark Mentovai
LGTM. I agree with Darin about the CHECK. http://codereview.chromium.org/18134/diff/210/10 File base/file_path.cc (right): http://codereview.chromium.org/18134/diff/210/10#newcode261 Line 261: ...
11 years, 11 months ago (2009-01-20 23:16:12 UTC) #6
Erik does not do reviews
Regarding the (D)CHECK, are you agreeing with him before or after reading my reply to ...
11 years, 11 months ago (2009-01-20 23:32:37 UTC) #7
darin (slow to review)
If you are worried about that problem, then you could also just add an IsASCII ...
11 years, 11 months ago (2009-01-21 06:14:46 UTC) #8
Dean McNamee
11 years, 11 months ago (2009-01-21 14:21:16 UTC) #9
LG.  This change would be great to reduce our uses of Append(FILE_PATH_LITERAL).
 This would meaning cutting down on some wchar_t literals on Windows, when the
small cost to convert is probably worthwhile.

Make sure to update the CL description, it's gone stale.

http://codereview.chromium.org/18134/diff/26/28
File base/file_path.cc (right):

http://codereview.chromium.org/18134/diff/26/28#newcode257
Line 257: return FilePath();
ASCIIToWide already does a DCHECK(IsStringASCII).  Do we really want this check
to not be a crash?  It seems like it would be better to catch the error than
return an empty filepath.

http://codereview.chromium.org/18134/diff/26/28#newcode260
Line 260: return Append(wcomponent);
return Append(ASCIIToWide(component)); ?

Powered by Google App Engine
This is Rietveld 408576698