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

Unified Diff: net/proxy/proxy_resolver_perftest.cc

Issue 149525: Remove the concept of threading from ProxyService, and move it into the Proxy... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Add missing header for mac Created 11 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/proxy/proxy_resolver_mac.cc ('k') | net/proxy/proxy_resolver_v8.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_resolver_perftest.cc
===================================================================
--- net/proxy/proxy_resolver_perftest.cc (revision 21630)
+++ net/proxy/proxy_resolver_perftest.cc (working copy)
@@ -92,11 +92,11 @@
void RunTest(const std::string& script_name,
const PacQuery* queries,
int queries_len) {
- GURL pac_url;
-
- if (resolver_->does_fetch()) {
+ if (!resolver_->expects_pac_bytes()) {
InitHttpServer();
- pac_url = server_->TestServerPage(std::string("files/") + script_name);
+ GURL pac_url =
+ server_->TestServerPage(std::string("files/") + script_name);
+ resolver_->SetPacScriptByUrl(pac_url);
} else {
LoadPacScriptIntoResolver(script_name);
}
@@ -107,7 +107,7 @@
{
net::ProxyInfo proxy_info;
int result = resolver_->GetProxyForURL(
- GURL("http://www.warmup.com"), pac_url, &proxy_info);
+ GURL("http://www.warmup.com"), &proxy_info, NULL, NULL);
ASSERT_EQ(net::OK, result);
}
@@ -122,8 +122,7 @@
// Resolve.
net::ProxyInfo proxy_info;
int result = resolver_->GetProxyForURL(GURL(query.query_url),
- pac_url,
- &proxy_info);
+ &proxy_info, NULL, NULL);
// Check that the result was correct. Note that ToPacString() and
// ASSERT_EQ() are fast, so they won't skew the results.
@@ -137,7 +136,7 @@
// Lazily startup an HTTP server (to serve the PAC script).
void InitHttpServer() {
- DCHECK(resolver_->does_fetch());
+ DCHECK(!resolver_->expects_pac_bytes());
if (!server_) {
server_ = HTTPTestServer::CreateServer(
L"net/data/proxy_resolver_perftest", NULL);
@@ -163,7 +162,7 @@
ASSERT_TRUE(ok);
// Load the PAC script into the ProxyResolver.
- resolver_->SetPacScript(file_contents);
+ resolver_->SetPacScriptByData(file_contents);
}
net::ProxyResolver* resolver_;
« no previous file with comments | « net/proxy/proxy_resolver_mac.cc ('k') | net/proxy/proxy_resolver_v8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698