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

Issue 1120012: Fix the "ls -l" style date parser to correctly guess the year if it is not provided. (Closed)

Created:
10 years, 9 months ago by Paweł Hajdan Jr.
Modified:
9 years, 7 months ago
Reviewers:
eroman, wtc
CC:
chromium-reviews
Visibility:
Public.

Description

Fix the "ls -l" style date parser to correctly guess the year if it is not provided. Also provide an infrastructure to mock the current time in the tests. BUG=36293 TEST=net_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=42447

Patch Set 1 #

Total comments: 2

Patch Set 2 : fixes #

Total comments: 1

Patch Set 3 : better comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -71 lines) Patch
M net/data/ftp/dir-listing-ls-1.expected View 2 chunks +2 lines, -2 lines 0 comments Download
M net/data/ftp/dir-listing-ls-1-utf8.expected View 2 chunks +2 lines, -2 lines 0 comments Download
M net/data/ftp/dir-listing-ls-10.expected View 1 chunk +1 line, -1 line 0 comments Download
M net/data/ftp/dir-listing-ls-12.expected View 1 chunk +1 line, -1 line 0 comments Download
M net/data/ftp/dir-listing-ls-13.expected View 1 chunk +1 line, -1 line 0 comments Download
M net/data/ftp/dir-listing-ls-15.expected View 2 chunks +2 lines, -2 lines 0 comments Download
M net/data/ftp/dir-listing-ls-16.expected View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M net/data/ftp/dir-listing-ls-7.expected View 1 chunk +1 line, -1 line 0 comments Download
M net/data/ftp/dir-listing-ls-9.expected View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M net/data/ftp/dir-listing-netware-2.expected View 2 chunks +2 lines, -2 lines 0 comments Download
M net/ftp/ftp_directory_listing_buffer.h View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M net/ftp/ftp_directory_listing_buffer.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M net/ftp/ftp_directory_listing_buffer_unittest.cc View 2 chunks +6 lines, -9 lines 0 comments Download
M net/ftp/ftp_directory_listing_parser_ls.h View 1 2 3 chunks +8 lines, -1 line 0 comments Download
M net/ftp/ftp_directory_listing_parser_ls.cc View 6 chunks +11 lines, -7 lines 0 comments Download
M net/ftp/ftp_directory_listing_parser_ls_unittest.cc View 6 chunks +14 lines, -9 lines 0 comments Download
M net/ftp/ftp_directory_listing_parser_netware.h View 1 2 3 chunks +8 lines, -1 line 0 comments Download
M net/ftp/ftp_directory_listing_parser_netware.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M net/ftp/ftp_directory_listing_parser_netware_unittest.cc View 4 chunks +10 lines, -5 lines 0 comments Download
M net/ftp/ftp_util.h View 1 chunk +4 lines, -3 lines 0 comments Download
M net/ftp/ftp_util.cc View 2 chunks +17 lines, -6 lines 0 comments Download
M net/ftp/ftp_util_unittest.cc View 3 chunks +15 lines, -6 lines 0 comments Download
M webkit/glue/ftp_directory_listing_response_delegate.cc View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Paweł Hajdan Jr.
10 years, 9 months ago (2010-03-23 13:11:27 UTC) #1
eroman
lgtm http://codereview.chromium.org/1120012/diff/1/13 File net/ftp/ftp_directory_listing_buffer.h (right): http://codereview.chromium.org/1120012/diff/1/13#newcode24 net/ftp/ftp_directory_listing_buffer.h:24: FtpDirectoryListingBuffer(const base::Time& current_time); please mark as explicit. Also ...
10 years, 9 months ago (2010-03-23 18:29:43 UTC) #2
Paweł Hajdan Jr.
All fixed, please take another look to see if the comments are clear.
10 years, 9 months ago (2010-03-23 18:40:49 UTC) #3
eroman
10 years, 9 months ago (2010-03-23 19:32:21 UTC) #4
LGTM

http://codereview.chromium.org/1120012/diff/6001/7012
File net/ftp/ftp_directory_listing_buffer.h (right):

http://codereview.chromium.org/1120012/diff/6001/7012#newcode24
net/ftp/ftp_directory_listing_buffer.h:24: // Constructor. When the current time
is needed, |current_time| will be used.
nit: I suggest being a bit more explicit on what |current_time| is used for,
say: "|current_time| is used to guess the year on partial date strings"

Powered by Google App Engine
This is Rietveld 408576698