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

Issue 6731064: kqueue implementation of FilePathWatcher on Mac. (Closed)

Created:
9 years, 9 months ago by dmac
Modified:
9 years, 7 months ago
CC:
chromium-reviews, jam, pam+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 41

Patch Set 2 : fixed up based on comments #

Patch Set 3 : missed a nit or two #

Total comments: 14

Patch Set 4 : fix up more comments. Substantial changes to make easier to read and handle attributes correctly #

Patch Set 5 : more minor tweaks #

Total comments: 2

Patch Set 6 : fixed up mattias's grammar nits, and added test #

Total comments: 5

Patch Set 7 : Ifdef'd out tests that weren't working, and fixed nits. #

Patch Set 8 : get working on 10.5, and clean up interface #

Patch Set 9 : Xcode didn't save some files, so win and linux changes missed #

Total comments: 1

Patch Set 10 : fix up parens #

Unified diffs Side-by-side diffs Delta from patch set Stats (+610 lines, -295 lines) Patch
M chrome/browser/policy/file_based_policy_loader.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/policy/file_based_policy_loader.cc View 1 2 3 4 5 6 7 4 chunks +10 lines, -11 lines 0 comments Download
M chrome/browser/user_style_sheet_watcher.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/common/service_process_util_mac.mm View 1 2 chunks +1 line, -4 lines 0 comments Download
M chrome/common/service_process_util_posix.h View 1 2 chunks +0 lines, -2 lines 0 comments Download
M content/browser/plugin_service.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -4 lines 0 comments Download
M content/common/file_path_watcher/file_path_watcher.h View 1 2 3 4 5 6 7 3 chunks +11 lines, -17 lines 0 comments Download
M content/common/file_path_watcher/file_path_watcher.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M content/common/file_path_watcher/file_path_watcher_browsertest.cc View 1 2 3 4 5 6 7 14 chunks +171 lines, -24 lines 0 comments Download
M content/common/file_path_watcher/file_path_watcher_inotify.cc View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -5 lines 0 comments Download
M content/common/file_path_watcher/file_path_watcher_mac.cc View 1 2 3 4 5 6 7 8 9 1 chunk +403 lines, -216 lines 0 comments Download
M content/common/file_path_watcher/file_path_watcher_win.cc View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -5 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
dmac
OK, so back to kqueues we go. PTAL.
9 years, 9 months ago (2011-03-29 21:02:10 UTC) #1
Mark Mentovai
FD leak concern. Also, that long OnCanRead function is a little confusing. http://codereview.chromium.org/6731064/diff/1/content/common/file_path_watcher/file_path_watcher.h File content/common/file_path_watcher/file_path_watcher.h ...
9 years, 9 months ago (2011-03-29 21:27:24 UTC) #2
Mattias Nissler (ping if slow)
First round of comments. http://codereview.chromium.org/6731064/diff/1/content/common/file_path_watcher/file_path_watcher_mac.cc File content/common/file_path_watcher/file_path_watcher_mac.cc (right): http://codereview.chromium.org/6731064/diff/1/content/common/file_path_watcher/file_path_watcher_mac.cc#newcode35 content/common/file_path_watcher/file_path_watcher_mac.cc:35: // that the FSEvents impl ...
9 years, 8 months ago (2011-03-30 11:30:52 UTC) #3
Mark Mentovai
http://codereview.chromium.org/6731064/diff/1/content/common/file_path_watcher/file_path_watcher_mac.cc File content/common/file_path_watcher/file_path_watcher_mac.cc (right): http://codereview.chromium.org/6731064/diff/1/content/common/file_path_watcher/file_path_watcher_mac.cc#newcode158 content/common/file_path_watcher/file_path_watcher_mac.cc:158: std::vector<struct kevent> updates(events_.size()); Mattias Nissler wrote: > Maybe a ...
9 years, 8 months ago (2011-03-30 13:59:08 UTC) #4
Mattias Nissler (ping if slow)
http://codereview.chromium.org/6731064/diff/1/content/common/file_path_watcher/file_path_watcher_mac.cc File content/common/file_path_watcher/file_path_watcher_mac.cc (right): http://codereview.chromium.org/6731064/diff/1/content/common/file_path_watcher/file_path_watcher_mac.cc#newcode158 content/common/file_path_watcher/file_path_watcher_mac.cc:158: std::vector<struct kevent> updates(events_.size()); On 2011/03/30 13:59:08, Mark Mentovai wrote: ...
9 years, 8 months ago (2011-03-30 14:07:52 UTC) #5
Mark Mentovai
mnissler@chromium.org wrote: > Can you give reasons? He doesn't use any vector-specific goodness, so > ...
9 years, 8 months ago (2011-03-30 14:14:47 UTC) #6
Mattias Nissler (ping if slow)
On Wed, Mar 30, 2011 at 4:14 PM, Mark Mentovai <mark@chromium.org> wrote: > mnissler@chromium.org wrote: ...
9 years, 8 months ago (2011-03-30 14:32:03 UTC) #7
dmaclach1
My reason for using vector over scoped_array was that I use a vector elsewhere (and ...
9 years, 8 months ago (2011-03-30 16:41:35 UTC) #8
Mark Mentovai
Mattias Nissler wrote: > I wouldn't consider a standard plain array and the usual scoped_array ...
9 years, 8 months ago (2011-03-30 16:53:54 UTC) #9
Mattias Nissler (ping if slow)
I don't see any functional difference between the two in this case, so I guess ...
9 years, 8 months ago (2011-03-30 16:57:13 UTC) #10
dmac
Thanks guys. Ball is back in your court(s) http://codereview.chromium.org/6731064/diff/1/content/common/file_path_watcher/file_path_watcher_mac.cc File content/common/file_path_watcher/file_path_watcher_mac.cc (right): http://codereview.chromium.org/6731064/diff/1/content/common/file_path_watcher/file_path_watcher_mac.cc#newcode35 content/common/file_path_watcher/file_path_watcher_mac.cc:35: // ...
9 years, 8 months ago (2011-03-30 17:18:47 UTC) #11
Mattias Nissler (ping if slow)
I'm still a bit unhappy about the long function. But since I don't have constructive ...
9 years, 8 months ago (2011-03-30 18:07:54 UTC) #12
Mark Mentovai
http://codereview.chromium.org/6731064/diff/4011/content/common/file_path_watcher/file_path_watcher_mac.cc File content/common/file_path_watcher/file_path_watcher_mac.cc (right): http://codereview.chromium.org/6731064/diff/4011/content/common/file_path_watcher/file_path_watcher_mac.cc#newcode172 content/common/file_path_watcher/file_path_watcher_mac.cc:172: LOG(ERROR) << "Error: " << events[i].data; Will these messages ...
9 years, 8 months ago (2011-03-30 18:20:39 UTC) #13
Mark Mentovai
Oh, I guess the close already does the EV_DELETE. Some of my other concerns remain, ...
9 years, 8 months ago (2011-03-30 19:49:30 UTC) #14
dmaclach1
On Wed, Mar 30, 2011 at 12:49 PM, Mark Mentovai <mark@chromium.org> wrote: > Oh, I ...
9 years, 8 months ago (2011-03-30 19:51:33 UTC) #15
dmac
Changes were substantial to refactor long function. PTAL. I really appreciate the feedback. http://codereview.chromium.org/6731064/diff/4011/content/common/file_path_watcher/file_path_watcher_mac.cc File ...
9 years, 8 months ago (2011-03-30 22:39:28 UTC) #16
Mattias Nissler (ping if slow)
My brain is incapable of doing a thorough review at this time, but I definitely ...
9 years, 8 months ago (2011-03-30 22:50:10 UTC) #17
dmac
On 2011/03/30 22:50:10, Mattias Nissler wrote: > My brain is incapable of doing a thorough ...
9 years, 8 months ago (2011-03-31 00:15:31 UTC) #18
Mark Mentovai
This is in good shape now. Let’s go with it. LGTM http://codereview.chromium.org/6731064/diff/16001/content/common/file_path_watcher/file_path_watcher_browsertest.cc File content/common/file_path_watcher/file_path_watcher_browsertest.cc (right): ...
9 years, 8 months ago (2011-03-31 01:50:35 UTC) #19
dmac
Brett/John/Darin As owners, could I get a review so I can check in? This is ...
9 years, 8 months ago (2011-03-31 18:28:26 UTC) #20
brettw
LGTM (I didn't do a real code review, and I certainly didn't look at the ...
9 years, 8 months ago (2011-03-31 21:00:43 UTC) #21
Mark Mentovai
brettw@chromium.org wrote: > LGTM (I didn't do a real code review, and I certainly didn't ...
9 years, 8 months ago (2011-03-31 21:03:02 UTC) #22
dmac
Turns out that this failed on 10.5 because kqueue on 10.5 returns both NOTE_ATTRIB and ...
9 years, 8 months ago (2011-04-01 18:09:46 UTC) #23
Mark Mentovai
9 years, 8 months ago (2011-04-01 18:13:37 UTC) #24
LGTM

http://codereview.chromium.org/6731064/diff/18002/content/common/file_path_wa...
File content/common/file_path_watcher/file_path_watcher_mac.cc (right):

http://codereview.chromium.org/6731064/diff/18002/content/common/file_path_wa...
content/common/file_path_watcher/file_path_watcher_mac.cc:384: if
((updates[i].fflags & NOTE_ATTRIB) && !target_file_affected) {
Rationalize your style here so everything is consistent. You don’t strictly need
parentheses around |updates[i].fflags & NOTE_ATTRIB| but you’ve used them here;
but then you didn’t use them in the same situation on line 390. Personally, I
think they improve readability. I don’t mind if you choose to not use them,
though, as long as you do the same thing here and on 390.

Powered by Google App Engine
This is Rietveld 408576698