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

Issue 87003: Implement file_util::CountFilesCreatedAfter() for posix environments.... (Closed)

Created:
11 years, 8 months ago by hamaji
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Implement file_util::CountFilesCreatedAfter() for posix environments. BUG=9833

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 4

Patch Set 3 : '' #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -6 lines) Patch
M base/file_util.h View 1 1 chunk +6 lines, -3 lines 0 comments Download
M base/file_util_posix.cc View 1 2 4 chunks +30 lines, -0 lines 4 comments Download
M base/file_util_unittest.cc View 1 2 2 chunks +6 lines, -3 lines 1 comment Download

Messages

Total messages: 12 (0 generated)
hamaji
11 years, 8 months ago (2009-04-21 00:13:55 UTC) #1
Evan Martin
Does the Windows version look in subdirectories, too? http://codereview.chromium.org/87003/diff/1005/8 File base/file_util_posix.cc (right): http://codereview.chromium.org/87003/diff/1005/8#newcode73 Line 73: ...
11 years, 8 months ago (2009-04-21 00:16:37 UTC) #2
hamaji
Thanks for the review! Both Windows version and POSIX version don't look in subdirectories. http://codereview.chromium.org/87003/diff/1005/8 ...
11 years, 8 months ago (2009-04-21 00:50:17 UTC) #3
Evan Martin
minor bug below. LGTM after tha http://codereview.chromium.org/87003/diff/1005/9 File base/file_util_unittest.cc (right): http://codereview.chromium.org/87003/diff/1005/9#newcode322 Line 322: #if defined(OS_WINDOWS) ...
11 years, 8 months ago (2009-04-21 00:54:29 UTC) #4
Evan Martin
On 2009/04/21 00:54:29, Evan Martin wrote: > minor bug below. LGTM after tha minor bug ...
11 years, 8 months ago (2009-04-21 00:54:47 UTC) #5
hamaji
Thanks you for your review. If there are no further issues, could you check this ...
11 years, 8 months ago (2009-04-21 01:33:00 UTC) #6
Erik does not do reviews
It looks like this review was already submitted. One issue, one nit for you for ...
11 years, 8 months ago (2009-04-21 16:10:21 UTC) #7
hamaji
Thanks for the review! I'll send another change which fixes the issues. On 2009/04/21 16:10:21, ...
11 years, 8 months ago (2009-04-21 18:19:56 UTC) #8
Hironori Bono
This is just a nit for your follow-on. http://codereview.chromium.org/87003/diff/15/17 File base/file_util_posix.cc (right): http://codereview.chromium.org/87003/diff/15/17#newcode76 Line 76: ...
11 years, 8 months ago (2009-04-22 04:46:27 UTC) #9
hamaji
Thanks for your review! As I wrote below, I want to keep the current code. ...
11 years, 8 months ago (2009-04-22 05:12:23 UTC) #10
Hironori Bono
http://codereview.chromium.org/87003/diff/15/17 File base/file_util_posix.cc (right): http://codereview.chromium.org/87003/diff/15/17#newcode76 Line 76: if (st.st_ctime >= comparison_time.ToTimeT()) On 2009/04/22 05:12:23, hamaji ...
11 years, 8 months ago (2009-04-22 05:35:58 UTC) #11
hamaji
11 years, 8 months ago (2009-04-22 06:02:02 UTC) #12
On 2009/04/22 05:35:58, hbono wrote:
> http://codereview.chromium.org/87003/diff/15/17
> File base/file_util_posix.cc (right):
> 
> http://codereview.chromium.org/87003/diff/15/17#newcode76
> Line 76: if (st.st_ctime >= comparison_time.ToTimeT())
> On 2009/04/22 05:12:23, hamaji wrote:
> > Good point. However, if we use Time::DoubleT(), I think there would be
another
> > issue. Please suppose the following case:
> > 
> > 1. Get comparison_time by Time::Now() and the value is 100.1 (secs).
> > 2. Create a file and the current time is 100.3 (secs).
> > 
> > As POSIX doesn't have millisecond precision for st_ctime, the creation time
of
> > the file created in the step 2 is 100 and the file is considered older than
> > |comparison_time|. After all, we may have to accept either of the two
issues:
> 1.
> > files which are older than |comparison_time| are considered newer (current
> > implementation) 2. files newer than |comparison_time| are considered older
> (your
> > suggestion). I chose the choice 1 just because we have already had sleep
> before
> > getting |comparison_time| in file_util_unittest.cc.
> 
> I'm wondering why you did not write this comment in your code, which is
> definitely useful for convincing readers.

Ah, yes. I should have wrote this comment... Thanks for the suggestion. I put
the comments in the another review:

http://codereview.chromium.org/87039

Thanks!

Powered by Google App Engine
This is Rietveld 408576698