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

Issue 201034: Get the latest ParseFTPList code from Mozilla, and apply only the absolutely (Closed)

Created:
11 years, 3 months ago by Paweł Hajdan Jr.
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Get the latest ParseFTPList code from Mozilla, and apply only the absolutely required changes. This way future merging would be much easier. TEST=none BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=25878

Patch Set 1 #

Total comments: 7

Patch Set 2 : even more minimal #

Total comments: 6

Patch Set 3 : fixes #

Patch Set 4 : kill NSPR comment #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+2091 lines, -1128 lines) Patch
M net/third_party/parseftp/ParseFTPList.h View 1 2 1 chunk +122 lines, -117 lines 0 comments Download
M net/third_party/parseftp/ParseFTPList.cpp View 1 2 3 6 chunks +1504 lines, -998 lines 0 comments Download
M net/third_party/parseftp/README.chromium View 1 1 chunk +3 lines, -2 lines 0 comments Download
A net/third_party/parseftp/chromium.patch View 1 2 3 1 chunk +440 lines, -0 lines 4 comments Download
M net/url_request/url_request_new_ftp_job.h View 2 chunks +2 lines, -2 lines 0 comments Download
M net/url_request/url_request_new_ftp_job.cc View 1 2 3 chunks +20 lines, -9 lines 1 comment Download

Messages

Total messages: 8 (0 generated)
Paweł Hajdan Jr.
I'm thinking about moving the support #defines to the .cc file to not pollute our ...
11 years, 3 months ago (2009-09-04 23:51:04 UTC) #1
wtc
Just some quick comments on reducing the size of our patch. http://codereview.chromium.org/201034/diff/1/5 File net/third_party/parseftp/chromium.patch (right): ...
11 years, 3 months ago (2009-09-05 02:12:54 UTC) #2
Paweł Hajdan Jr.
So, the patch is now more minimal. Please review.
11 years, 3 months ago (2009-09-08 17:27:08 UTC) #3
wtc
The mapping from PRTime::tm_month to base::Time::Exploded::month needs work. The former (tm_month) is 0-based month, 0 ...
11 years, 3 months ago (2009-09-09 01:50:06 UTC) #4
wtc
FYI, the PRExplodedTime structure is documented at https://developer.mozilla.org/en/PRExplodedTime Compare its members with the members of ...
11 years, 3 months ago (2009-09-09 15:47:17 UTC) #5
Paweł Hajdan Jr.
On 2009/09/09 01:50:06, wtc wrote: > The mapping from PRTime::tm_month to > base::Time::Exploded::month needs work. ...
11 years, 3 months ago (2009-09-10 17:40:55 UTC) #6
wtc
http://codereview.chromium.org/201034/diff/1/4 File net/third_party/parseftp/README.chromium (right): http://codereview.chromium.org/201034/diff/1/4#newcode1 Line 1: This directory contains Mozilla FTP LIST response parsing ...
11 years, 3 months ago (2009-09-10 18:10:46 UTC) #7
wtc
11 years, 3 months ago (2009-09-10 18:55:32 UTC) #8
LGTM, with the following changes.

(I reviewed chromium.patch instead of the changes
to ParseFTPList.{h,cpp}.)

http://codereview.chromium.org/201034/diff/8001/4010
File net/third_party/parseftp/chromium.patch (right):

http://codereview.chromium.org/201034/diff/8001/4010#newcode39
Line 39: +                t.LocalExplode(&(result->fe_time));
We need to subtract 1 from result->fe_time.month after
the t.LocalExplode call.

http://codereview.chromium.org/201034/diff/8001/4010#newcode236
Line 236: +            t.LocalExplode(&(state->now_tm));
We need to subtract 1 from state->now_tm.month after
the t.LocalExplode call.

http://codereview.chromium.org/201034/diff/8001/4010#newcode355
Line 355: +                  t.LocalExplode(&(state->now_tm));
We need to subtract 1 from state->now_tm.month after
the t.LocalExplode call.

http://codereview.chromium.org/201034/diff/8001/4010#newcode396
Line 396: +namespace net {
Let's add a comment here about the 'month' field
of base::Time::Exploded being 0-11 (0 = January) to
match PRExplodedTime, and that the caller of ParseFTPList
is responsible for adding 1 to 'month' after ParseFTPList
returns if it uses result->fe_time.

Another option is to include "base/third_party/nspr/prtime.h".
This gives us the definitions of not only PRExplodedTime
but also PRInt32, PRUint32, PRBool, and PRTime.  We
need to do the base::Time::Exploded => PRExplodedTime
conversion in ParseFTPList.cpp (after the t.LocalExplode()
calls), and the caller of ParseFTPList() needs to do the
PRExplodedTime => base::Time::Exploded conversion
in url_request_new_ftp_job.cc.  The conversion requries
extra copying, but it makes the code much easier to
understand, and makes the diffs smaller.

http://codereview.chromium.org/201034/diff/8001/4011
File net/url_request/url_request_new_ftp_job.cc (right):

http://codereview.chromium.org/201034/diff/8001/4011#newcode257
Line 257: // the third-party parsing code uses bit-shifting on the month,
I now understand the bit-shifting code in ParseFTPList.cpp.
The bit-shifting code works whether 'month' is 0-based or
1-based.

Powered by Google App Engine
This is Rietveld 408576698