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

Issue 250833003: Clean up the Linux FileWatcher implementation. (Closed)

Created:
6 years, 8 months ago by Lei Zhang
Modified:
6 years, 7 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Visibility:
Public.

Description

Clean up the Linux FileWatcher implementation. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266387

Patch Set 1 #

Total comments: 7

Patch Set 2 : reflow comments #

Patch Set 3 : fix style error for struct, misc nits #

Total comments: 11

Patch Set 4 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+141 lines, -121 lines) Patch
M base/files/file_path_watcher_linux.cc View 1 2 3 11 chunks +141 lines, -121 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Lei Zhang
https://codereview.chromium.org/250833003/diff/1/base/files/file_path_watcher_linux.cc File base/files/file_path_watcher_linux.cc (left): https://codereview.chromium.org/250833003/diff/1/base/files/file_path_watcher_linux.cc#oldcode53 base/files/file_path_watcher_linux.cc:53: bool RemoveWatch(Watch watch, FilePathWatcherImpl* watcher); Nobody checks the return ...
6 years, 8 months ago (2014-04-25 06:45:22 UTC) #1
Lei Zhang
See patch set 3
6 years, 8 months ago (2014-04-25 06:50:25 UTC) #2
Mattias Nissler (ping if slow)
https://codereview.chromium.org/250833003/diff/40001/base/files/file_path_watcher_linux.cc File base/files/file_path_watcher_linux.cc (left): https://codereview.chromium.org/250833003/diff/40001/base/files/file_path_watcher_linux.cc#oldcode291 base/files/file_path_watcher_linux.cc:291: FilePath::StringType child(event->len ? event->name : FILE_PATH_LITERAL("")); Dropping FILE_PATH_LITERAL adds ...
6 years, 8 months ago (2014-04-25 08:38:24 UTC) #3
Lei Zhang
https://codereview.chromium.org/250833003/diff/40001/base/files/file_path_watcher_linux.cc File base/files/file_path_watcher_linux.cc (left): https://codereview.chromium.org/250833003/diff/40001/base/files/file_path_watcher_linux.cc#oldcode291 base/files/file_path_watcher_linux.cc:291: FilePath::StringType child(event->len ? event->name : FILE_PATH_LITERAL("")); On 2014/04/25 08:38:24, ...
6 years, 8 months ago (2014-04-25 08:49:32 UTC) #4
Mattias Nissler (ping if slow)
LGTM https://codereview.chromium.org/250833003/diff/40001/base/files/file_path_watcher_linux.cc File base/files/file_path_watcher_linux.cc (right): https://codereview.chromium.org/250833003/diff/40001/base/files/file_path_watcher_linux.cc#newcode333 base/files/file_path_watcher_linux.cc:333: for (size_t i = 0; i < watches_.size(); ...
6 years, 8 months ago (2014-04-25 09:06:57 UTC) #5
Lei Zhang
On 2014/04/25 09:06:57, Mattias Nissler wrote: > LGTM > > https://codereview.chromium.org/250833003/diff/40001/base/files/file_path_watcher_linux.cc > File base/files/file_path_watcher_linux.cc (right): ...
6 years, 8 months ago (2014-04-25 17:30:16 UTC) #6
Lei Zhang
The CQ bit was checked by thestig@chromium.org
6 years, 8 months ago (2014-04-25 17:30:20 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thestig@chromium.org/250833003/60001
6 years, 8 months ago (2014-04-25 22:13:53 UTC) #8
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-26 08:17:43 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_chromium_rel
6 years, 8 months ago (2014-04-26 08:17:43 UTC) #10
Lei Zhang
The CQ bit was checked by thestig@chromium.org
6 years, 8 months ago (2014-04-26 16:49:20 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thestig@chromium.org/250833003/60001
6 years, 8 months ago (2014-04-26 16:50:41 UTC) #12
commit-bot: I haz the power
Change committed as 266387
6 years, 8 months ago (2014-04-26 22:26:42 UTC) #13
Mattias Nissler (ping if slow)
6 years, 7 months ago (2014-04-28 10:51:14 UTC) #14
Message was sent while issue was closed.
On 2014/04/25 17:30:16, Lei Zhang wrote:
> On 2014/04/25 09:06:57, Mattias Nissler wrote:
> > LGTM
> > 
> >
>
https://codereview.chromium.org/250833003/diff/40001/base/files/file_path_wat...
> > File base/files/file_path_watcher_linux.cc (right):
> > 
> >
>
https://codereview.chromium.org/250833003/diff/40001/base/files/file_path_wat...
> > base/files/file_path_watcher_linux.cc:333: for (size_t i = 0; i <
> > watches_.size(); ++i) {
> > On 2014/04/25 08:49:32, Lei Zhang wrote:
> > > On 2014/04/25 08:38:24, Mattias Nissler wrote:
> > > > So you just prefer indexing over iterators? Or is there a good reason
for
> > the
> > > > conversion(s) that I'm missing?
> > > 
> > > I do, it makes the for-loop line easier to read in some cases. e.g. line
387
> > on
> > > the left.
> > 
> > I don't see the advantage to be honest, and I personally do prefer iterators
> as
> > these do work for all STL containers equally well. However, I don't think
it's
> > worth fighting over, and I don't convert code from on way to the other when
I
> > touch it. Do what you wish.
> 
> For vectors, IMO it's more compact to write: for (size_t i = 0 ...) than the
> iterator version. You can also access a vector of pointers more directly as
> foo[i]->bar instead of (*foo_it)->bar.

I don't see the readability gain that would justify the churn caused by all the
back-and-forth changes that people make :) Anyhow, fighting this is wasted time.

Powered by Google App Engine
This is Rietveld 408576698