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

Issue 7518028: DnsConfigService and a posix implementation (Closed)

Created:
9 years, 4 months ago by szym
Modified:
9 years, 4 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

DnsConfigService and a posix implementation Contributed by: Szymon Jakubczak <szym@chromium.org>; BUG=90881 TEST=./net_unittests --gtest_filter="DnsConfigServiceTest*" Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=97282

Patch Set 1 #

Patch Set 2 : fixed lint #

Total comments: 20

Patch Set 3 : added unit test, fixed some issues around ref-counting (and a sigsegv) #

Patch Set 4 : fixed lint #

Patch Set 5 : missing defaults for DnsConfig; complete unittest #

Patch Set 6 : delinted #

Total comments: 47

Patch Set 7 : Changed Delegate -> Observer(List); internal handling of Watch failures. #

Total comments: 14

Patch Set 8 : Just a comment. Ready to review. #

Patch Set 9 : Mocked-out res_init and FilePathWatcher for increased coverage and less flakiness. #

Patch Set 10 : Addressing lint errors. #

Total comments: 54

Patch Set 11 : Deflaked test. Addressed memory leaks and comments. #

Total comments: 1

Patch Set 12 : Fixes for mac and clang. #

Patch Set 13 : consistency #

Patch Set 14 : addressing review comment #

Patch Set 15 : Replaced res_nclose with CloseResState in mocks/tests. #

Patch Set 16 : delinted #

Patch Set 17 : delinted more #

Patch Set 18 : delinted even more #

Patch Set 19 : CloseResState applies to OS_LINUX only #

Unified diffs Side-by-side diffs Delta from patch set Stats (+993 lines, -0 lines) Patch
A net/dns/dns_config_service.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +91 lines, -0 lines 0 comments Download
A net/dns/dns_config_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +32 lines, -0 lines 0 comments Download
A net/dns/dns_config_service_posix.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +115 lines, -0 lines 0 comments Download
A net/dns/dns_config_service_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +277 lines, -0 lines 0 comments Download
A net/dns/dns_config_service_posix_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +472 lines, -0 lines 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
cbentzel
This is roughly what I expected - great! Talib - does this look like it ...
9 years, 4 months ago (2011-08-01 19:52:25 UTC) #1
szym
Thanks for the pre-review. I'm getting accustomed to the testing framework. I haven't tested if ...
9 years, 4 months ago (2011-08-01 20:22:01 UTC) #2
cbentzel
The biggest thing I am worried about for testing is lifetime issues especially during shutdown ...
9 years, 4 months ago (2011-08-01 21:11:00 UTC) #3
szym1
Chris, Before the full review, I'd like to ensure this code works. So I'd like ...
9 years, 4 months ago (2011-08-01 21:16:35 UTC) #4
cbentzel
Why don't you have AsyncHostResolver create a DnsConfigService, and act as a delegate? You could ...
9 years, 4 months ago (2011-08-01 21:21:42 UTC) #5
agayev
On 2011/08/01 19:52:25, cbentzel wrote: > This is roughly what I expected - great! > ...
9 years, 4 months ago (2011-08-02 14:08:56 UTC) #6
szym
Added a sketch of a unittest. Currently, DnsConfigServicePosix must be destructed on the same thread ...
9 years, 4 months ago (2011-08-03 23:03:50 UTC) #7
cbentzel
This is looking pretty good. Please don't be concerned about the number of comments - ...
9 years, 4 months ago (2011-08-04 18:09:26 UTC) #8
cbentzel
http://codereview.chromium.org/7518028/diff/12006/net/dns/dns_config_service_posix.cc File net/dns/dns_config_service_posix.cc (right): http://codereview.chromium.org/7518028/diff/12006/net/dns/dns_config_service_posix.cc#newcode153 net/dns/dns_config_service_posix.cc:153: FilePath path(FILE_PATH_LITERAL("/etc/resolv.conf")); Is _PATH_RESCONF defined correctly in the different ...
9 years, 4 months ago (2011-08-04 18:24:56 UTC) #9
szym
Thanks for all the comments. Next, I'll ensure to have only one res_ninit job at ...
9 years, 4 months ago (2011-08-04 18:55:10 UTC) #10
cbentzel
http://codereview.chromium.org/7518028/diff/12006/net/dns/dns_config_service.h File net/dns/dns_config_service.h (right): http://codereview.chromium.org/7518028/diff/12006/net/dns/dns_config_service.h#newcode80 net/dns/dns_config_service.h:80: // Callback interface for the client. The delegate is ...
9 years, 4 months ago (2011-08-04 20:01:21 UTC) #11
cbentzel
http://codereview.chromium.org/7518028/diff/12006/net/dns/dns_config_service.h File net/dns/dns_config_service.h (right): http://codereview.chromium.org/7518028/diff/12006/net/dns/dns_config_service.h#newcode22 net/dns/dns_config_service.h:22: // To be used with AsyncHostResolver. On 2011/08/04 18:55:10, ...
9 years, 4 months ago (2011-08-05 13:01:25 UTC) #12
szym
On 2011/08/05 13:01:25, cbentzel wrote: > http://codereview.chromium.org/7518028/diff/12006/net/dns/dns_config_service.h > File net/dns/dns_config_service.h (right): > > http://codereview.chromium.org/7518028/diff/12006/net/dns/dns_config_service.h#newcode22 > ...
9 years, 4 months ago (2011-08-05 16:51:20 UTC) #13
cbentzel
http://codereview.chromium.org/7518028/diff/18001/net/dns/dns_config_service.h File net/dns/dns_config_service.h (right): http://codereview.chromium.org/7518028/diff/18001/net/dns/dns_config_service.h#newcode41 net/dns/dns_config_service.h:41: // Min. number of dots before global resolution precedes ...
9 years, 4 months ago (2011-08-05 19:11:39 UTC) #14
szym
http://codereview.chromium.org/7518028/diff/18001/net/dns/dns_config_service.h File net/dns/dns_config_service.h (right): http://codereview.chromium.org/7518028/diff/18001/net/dns/dns_config_service.h#newcode41 net/dns/dns_config_service.h:41: // Min. number of dots before global resolution precedes ...
9 years, 4 months ago (2011-08-15 14:27:42 UTC) #15
cbentzel
Overall this looks very good. You're dealing very well with tricky threading and lifetime issues, ...
9 years, 4 months ago (2011-08-15 18:16:34 UTC) #16
szym
Hopefully all races are gone, but trybot might still catch some. I haven't "valground" it ...
9 years, 4 months ago (2011-08-15 22:02:01 UTC) #17
cbentzel
LGTM I'll patch and run a try job. http://codereview.chromium.org/7518028/diff/25004/net/dns/dns_config_service_posix.cc File net/dns/dns_config_service_posix.cc (right): http://codereview.chromium.org/7518028/diff/25004/net/dns/dns_config_service_posix.cc#newcode171 net/dns/dns_config_service_posix.cc:171: void ...
9 years, 4 months ago (2011-08-16 17:44:24 UTC) #18
commit-bot: I haz the power
The commit queue went berserk retrying too often for a seemingly flaky test. Builder is ...
9 years, 4 months ago (2011-08-17 19:39:53 UTC) #19
commit-bot: I haz the power
9 years, 4 months ago (2011-08-18 04:41:28 UTC) #20
Change committed as 97282

Powered by Google App Engine
This is Rietveld 408576698