|
Refactorings surrounding HostResolver:
(1) Extract HostResolver to an interface.
The existing concrete implementation is now named HostResolverImpl. This makes it possible to create mocks with more complex behavior (i.e. choose via rules if response will be sync vs async).
(2) Transform HostMapper into HostResolverProc.
Conceptually HostResolverProc maps a hostname to a socket address, whereas HostMapper mapped a hostname to another hostname (so you were still at the mercy of the system's host resolver). With HostResolverProc you can specify the exact AddressList, making it possible to run tests requiring IPv6 socketaddrs on systems (like WinXP) that don't actually support it.
(3) Add a MockHostResolver implementation of HostResolver.
This replaces the [ScopedHostMapper + RuleBasedHostMapper + HostResolver] combo. It is less clunky and a bit more expressive.
BUG=http://crbug.com/16452
R=willchan
TEST=existing
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=20795
Total comments: 2
Total comments: 2
Total comments: 20
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+747 lines, -3188 lines) |
Patch |
 |
MM |
chrome/browser/browser_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
5 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/net/dns_global.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/net/dns_master_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
16 chunks |
+44 lines, -44 lines |
0 comments
|
Download
|
 |
MM |
chrome/browser/search_engines/template_url_scraper_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/test/in_process_browser_test.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/test/in_process_browser_test.cc
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+10 lines, -9 lines |
0 comments
|
Download
|
 |
M |
chrome/test/unit/chrome_test_suite.h
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+13 lines, -11 lines |
0 comments
|
Download
|
 |
M |
net/base/address_list_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+4 lines, -19 lines |
0 comments
|
Download
|
 |
M |
net/base/host_resolver.h
|
View
|
1
2
3
4
5
6
7
|
5 chunks |
+18 lines, -141 lines |
0 comments
|
Download
|
 |
M |
net/base/host_resolver.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -606 lines |
0 comments
|
Download
|
 |
A + |
net/base/host_resolver_impl.h
|
View
|
1
2
3
|
4 chunks |
+39 lines, -203 lines |
0 comments
|
Download
|
 |
A + |
net/base/host_resolver_impl.cc
|
View
|
1
2
3
4
5
6
|
19 chunks |
+59 lines, -243 lines |
0 comments
|
Download
|
 |
A + |
net/base/host_resolver_impl_unittest.cc
|
View
|
1
2
3
|
27 chunks |
+130 lines, -106 lines |
0 comments
|
Download
|
 |
A |
net/base/host_resolver_proc.h
|
View
|
1
2
3
4
|
1 chunk |
+69 lines, -0 lines |
0 comments
|
Download
|
 |
A + |
net/base/host_resolver_proc.cc
|
View
|
1
2
3
|
6 chunks |
+37 lines, -524 lines |
0 comments
|
Download
|
 |
D |
net/base/host_resolver_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+0 lines, -899 lines |
0 comments
|
Download
|
 |
A + |
net/base/mock_host_resolver.h
|
View
|
1
2
3
4
|
2 chunks |
+83 lines, -110 lines |
0 comments
|
Download
|
 |
A + |
net/base/mock_host_resolver.cc
|
View
|
1
2
3
|
1 chunk |
+122 lines, -138 lines |
0 comments
|
Download
|
 |
M |
net/base/run_all_unittests.cc
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
net/ftp/ftp_network_transaction_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+5 lines, -6 lines |
0 comments
|
Download
|
 |
M |
net/http/http_network_layer_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
net/http/http_network_transaction_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
5 chunks |
+13 lines, -12 lines |
0 comments
|
Download
|
 |
M |
net/net.gyp
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+8 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/proxy/proxy_resolver_perftest.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
net/proxy/proxy_resolver_v8.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/proxy/proxy_resolver_v8_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+8 lines, -6 lines |
0 comments
|
Download
|
 |
M |
net/proxy/proxy_script_fetcher_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/socket/client_socket_pool_base_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
6 chunks |
+5 lines, -6 lines |
0 comments
|
Download
|
 |
M |
net/socket/socks5_client_socket_unittest.cc
|
View
|
|
6 chunks |
+7 lines, -15 lines |
0 comments
|
Download
|
 |
M |
net/socket/socks_client_socket_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
5 chunks |
+5 lines, -18 lines |
0 comments
|
Download
|
 |
M |
net/socket/ssl_client_socket_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
8 chunks |
+9 lines, -13 lines |
0 comments
|
Download
|
 |
M |
net/socket/ssl_test_util.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/socket/tcp_client_socket_pool_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+11 lines, -11 lines |
0 comments
|
Download
|
 |
M |
net/socket/tcp_client_socket_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/socket/tcp_pinger_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/tools/fetch/fetch_client.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
net/url_request/url_request_unittest.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/url_request/url_request_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
webkit/tools/test_shell/test_shell_request_context.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 7 (0 generated)
|