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

Issue 6033006: Use FileWatcher to watch system resolver config, on systems that require...

Created:
10 years ago by rojer9
Modified:
9 years, 11 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org, eroman
Visibility:
Public.

Description

Use FileWatcher to watch system resolver config, on systems that require and support it (effectively Linux).

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -27 lines) Patch
M chrome/browser/browser_main.cc View 2 chunks +5 lines, -0 lines 0 comments Download
M net/base/dns_reload_timer.h View 2 chunks +14 lines, -1 line 0 comments Download
M net/base/dns_reload_timer.cc View 3 chunks +131 lines, -22 lines 1 comment Download
M net/base/dnsrr_resolver.cc View 2 chunks +8 lines, -2 lines 0 comments Download
M net/base/host_resolver_proc.cc View 1 chunk +7 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
eroman
Adam/Evan, are you the right people to review this? Who is up to speed on ...
9 years, 11 months ago (2011-01-04 23:15:27 UTC) #1
Evan Martin
I'll defer to Adam on this one. Craig also helped with the original patches in ...
9 years, 11 months ago (2011-01-04 23:17:41 UTC) #2
willchan no longer on Chromium
Drive-by comments. Thanks for working on this change! Can you motivate the change a bit ...
9 years, 11 months ago (2011-01-04 23:50:40 UTC) #3
rojer9
On 2011/01/04 23:50:40, willchan wrote: > Drive-by comments. > > Thanks for working on this ...
9 years, 11 months ago (2011-01-05 00:07:12 UTC) #4
Craig
On 2011/01/04 23:50:40, willchan wrote: > Drive-by comments. > > Thanks for working on this ...
9 years, 11 months ago (2011-01-05 00:58:24 UTC) #5
willchan no longer on Chromium
On Tue, Jan 4, 2011 at 4:58 PM, <craig.schlenter@chromium.org> wrote: > On 2011/01/04 23:50:40, willchan ...
9 years, 11 months ago (2011-01-05 01:01:07 UTC) #6
willchan no longer on Chromium
Thanks for your comments! Unfortunately, I believe that the guidance provided in the bug thread ...
9 years, 11 months ago (2011-01-05 20:37:24 UTC) #7
Craig
On 2011/01/05 20:37:24, willchan wrote: > Thanks for your comments! Unfortunately, I believe that the ...
9 years, 11 months ago (2011-01-06 03:42:37 UTC) #8
willchan no longer on Chromium
9 years, 11 months ago (2011-01-06 03:57:51 UTC) #9
On Wed, Jan 5, 2011 at 7:42 PM, <craig.schlenter@chromium.org> wrote:

> On 2011/01/05 20:37:24, willchan wrote:
>
>> Thanks for your comments!  Unfortunately, I believe that the guidance
>> provided
>> in the bug thread was made without a full understanding of the Chromium
>>
> network
>
>> stack, and thus, the solution would result in suboptimal networking
>> interactions.
>>
>
> Yeah that's my fault, sorry but I did suggest in the bug that we get
> agreement
> from people familiar with the stack on the right approach before
> proceeding. The
> pointer to the existing inotify code was intended to be a 'maybe this can
> be
> used suggestion but I'm not sure' not 'you must use this'.


Hah, don't worry Craig.  You already know a remarkable amount for someone
who only dabbles with Chromium in his spare time.  I wasn't blaming you.
 Was more apologizing to rojer9 for suggesting that, despite his helpful
work, we should probably revisit how we tackle this problem, and giving him
an explanation for why.


>
>
>
>  I'm sorry that I did not notice the bug thread and get involved
>> earlier before you wrote up this changelist.  Let's discuss it further on
>> the
>> bug thread and put the change on hold for now.  I'll update the bug thread
>> shortly.
>>
>
>  PS: Some meta-comments on this chromium change wrt conventions:
>> * Please add a line in the changelist description saying BUG=12345, since
>> our
>> code review webapp (Rietveld) and commit bot will parse that and do
>> various
>> things (linkify in the webapp and update the bug thread when the change is
>> committed).
>> * Please reply inline to reviewer comments.  For example,
>>
>
>
>
http://codereview.chromium.org/6033006/diff/1/net/base/dns_reload_timer.cc#ne...
> .
>
>  On 2011/01/05 00:07:12, rojer9 wrote:
>> > On 2011/01/04 23:50:40, willchan wrote:
>> > > Drive-by comments.
>> > >
>> > > Thanks for working on this change!  Can you motivate the change a bit
>>
> more?
>
>> >
>> > this is my proposed solution for http://crbug.com/67734
>> > the gist of it: resolv.conf needs to be re-read and current solution -
>> > re-reading on failure - doesn't work in some network configurations.
>> > watching file for changes and reloading resolv.conf if it has changed
>>
> *before*
>
>> > attempting resolution solves that problem and is generally a better
>> sound
>> > approach. though in this CL i'm not getting rid of the old one, my
>>
> expectation
>
>> > is that it's not going to matter anymore.
>> >
>> > > Is there a reason you wish to use FileWatcher?
>> >
>> > i wanted to use the inotify(7) interface and FileWatcher already
>> provides a
>> > handy wrapper around it (except for the dependency, which needs to be
>> > addressed).
>> >
>> > > Are you changing the platform defines to make this code only run on
>> Linux
>> > systems?
>> >
>> > WATCH_RESOLV_CONF is just a more readable shortcut for the expression
>> that
>>
> was
>
>> > being used. yes, as it stands now all of resolv.conf logic is only built
>> on
>> > linux and possibly freebsd: windows and os x don't need it and openbsd
>> does
>> not
>> > support thread-safe reload of resolver configuration, so it's disabled
>>
> there.
>
>> > this is all in the original comments and i'm not changing anything
>>
> substantial
>
>> > here, just replaced a hairy expression with more readable one.
>> >
>> > > There are a lot of
>> > > stylistic things that are incorrect in this change, probably due to
>> your
>> > > unfamiliarity with Chromium style.  Before delving into those, I think
>>
> it'd
>
>> be
>> > > good to make sure that this change is desirable.  Can you update the
>> > changelist
>> > > description to explain why you're doing what you're doing?  Is
>> switching
>>
> to
>
>> > > FileWatcher solving an existing issue?
>> >
>> > it does. i think the discussion on the bug should clarify what is being
>> > addressed, why and how.
>> >
>> > >
>> > >
>> http://codereview.chromium.org/6033006/diff/1/net/base/dns_reload_timer.cc
>> > > File net/base/dns_reload_timer.cc (right):
>> > >
>> > >
>> >
>>
>
>
>
http://codereview.chromium.org/6033006/diff/1/net/base/dns_reload_timer.cc#ne...
>
>> > > net/base/dns_reload_timer.cc:18: #include
>> > > "chrome/browser/file_path_watcher/file_path_watcher.h"
>> > > net is a lower level module than chrome.  chrome depends on net.  Not
>> vice
>> > > versa.  So this dependency is unacceptable.
>> >
>> > i agree, so i surmised when i was adding it :)
>> > it would be a pity if inotify had to be re-written just because of the
>> > dependency problem. maybe filewatcher could be pulled up?
>> > alternatively, this code could be moved down to chrome/browser, but
>> there
>> needs
>> > to be some way of communicating with resolver code in net/base.
>>
>
>
>
> http://codereview.chromium.org/6033006/
>

Powered by Google App Engine
This is Rietveld 408576698