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

Side by Side Diff: net/test/test_server.cc

Issue 4208002: Revert 64202 - Initial support for built-in DNS resolver/cache.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/socket/tcp_client_socket_unittest.cc ('k') | net/tools/fetch/fetch_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/test/test_server.h" 5 #include "net/test/test_server.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 default: 184 default:
185 NOTREACHED(); 185 NOTREACHED();
186 } 186 }
187 return std::string(); 187 return std::string();
188 } 188 }
189 189
190 bool TestServer::GetAddressList(AddressList* address_list) const { 190 bool TestServer::GetAddressList(AddressList* address_list) const {
191 DCHECK(address_list); 191 DCHECK(address_list);
192 192
193 scoped_ptr<HostResolver> resolver( 193 scoped_ptr<HostResolver> resolver(
194 CreateSystemHostResolver(HostResolver::kDefaultParallelism, NULL, NULL)); 194 CreateSystemHostResolver(HostResolver::kDefaultParallelism, NULL));
195 HostResolver::RequestInfo info(host_port_pair_); 195 HostResolver::RequestInfo info(host_port_pair_);
196 int rv = resolver->Resolve(info, address_list, NULL, NULL, BoundNetLog()); 196 int rv = resolver->Resolve(info, address_list, NULL, NULL, BoundNetLog());
197 if (rv != net::OK) { 197 if (rv != net::OK) {
198 LOG(ERROR) << "Failed to resolve hostname: " << host_port_pair_.host(); 198 LOG(ERROR) << "Failed to resolve hostname: " << host_port_pair_.host();
199 return false; 199 return false;
200 } 200 }
201 return true; 201 return true;
202 } 202 }
203 203
204 GURL TestServer::GetURL(const std::string& path) { 204 GURL TestServer::GetURL(const std::string& path) {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 return certificates_dir_.AppendASCII("ok_cert.pem"); 303 return certificates_dir_.AppendASCII("ok_cert.pem");
304 case TYPE_HTTPS_EXPIRED_CERTIFICATE: 304 case TYPE_HTTPS_EXPIRED_CERTIFICATE:
305 return certificates_dir_.AppendASCII("expired_cert.pem"); 305 return certificates_dir_.AppendASCII("expired_cert.pem");
306 default: 306 default:
307 NOTREACHED(); 307 NOTREACHED();
308 } 308 }
309 return FilePath(); 309 return FilePath();
310 } 310 }
311 311
312 } // namespace net 312 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/tcp_client_socket_unittest.cc ('k') | net/tools/fetch/fetch_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698