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

Side by Side Diff: chrome/browser/net/connection_tester_unittest.cc

Issue 7827033: Introduce net::HttpServerPropertiesManager to manage server-specific properties. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/net/connection_tester.h" 5 #include "chrome/browser/net/connection_tester.h"
6 6
7 #include "chrome/test/base/testing_pref_service.h" 7 #include "chrome/test/base/testing_pref_service.h"
8 #include "content/browser/browser_thread.h" 8 #include "content/browser/browser_thread.h"
9 #include "net/base/cert_verifier.h" 9 #include "net/base/cert_verifier.h"
10 #include "net/base/cookie_monster.h" 10 #include "net/base/cookie_monster.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 proxy_service_.reset(net::ProxyService::CreateDirect()); 122 proxy_service_.reset(net::ProxyService::CreateDirect());
123 proxy_script_fetcher_context_->set_proxy_service(proxy_service_.get()); 123 proxy_script_fetcher_context_->set_proxy_service(proxy_service_.get());
124 ssl_config_service_ = new net::SSLConfigServiceDefaults; 124 ssl_config_service_ = new net::SSLConfigServiceDefaults;
125 net::HttpNetworkSession::Params session_params; 125 net::HttpNetworkSession::Params session_params;
126 session_params.host_resolver = &host_resolver_; 126 session_params.host_resolver = &host_resolver_;
127 session_params.cert_verifier = &cert_verifier_; 127 session_params.cert_verifier = &cert_verifier_;
128 session_params.dnsrr_resolver = &dnsrr_resolver_; 128 session_params.dnsrr_resolver = &dnsrr_resolver_;
129 session_params.http_auth_handler_factory = &http_auth_handler_factory_; 129 session_params.http_auth_handler_factory = &http_auth_handler_factory_;
130 session_params.ssl_config_service = ssl_config_service_; 130 session_params.ssl_config_service = ssl_config_service_;
131 session_params.proxy_service = proxy_service_.get(); 131 session_params.proxy_service = proxy_service_.get();
132 session_params.http_server_properties = NULL;
willchan no longer on Chromium 2011/10/06 22:13:22 Shouldn't be necessary.
ramant (doing other things) 2011/10/07 01:40:20 Done.
132 scoped_refptr<net::HttpNetworkSession> network_session( 133 scoped_refptr<net::HttpNetworkSession> network_session(
133 new net::HttpNetworkSession(session_params)); 134 new net::HttpNetworkSession(session_params));
134 http_transaction_factory_.reset( 135 http_transaction_factory_.reset(
135 new net::HttpNetworkLayer(network_session)); 136 new net::HttpNetworkLayer(network_session));
136 proxy_script_fetcher_context_->set_http_transaction_factory( 137 proxy_script_fetcher_context_->set_http_transaction_factory(
137 http_transaction_factory_.get()); 138 http_transaction_factory_.get());
138 // In-memory cookie store. 139 // In-memory cookie store.
139 proxy_script_fetcher_context_->set_cookie_store( 140 proxy_script_fetcher_context_->set_cookie_store(
140 new net::CookieMonster(NULL, NULL)); 141 new net::CookieMonster(NULL, NULL));
141 } 142 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // any pending tasks instead of running them. This causes a problem with 192 // any pending tasks instead of running them. This causes a problem with
192 // net::ClientSocketPoolBaseHelper, since the "Group" holds a pointer 193 // net::ClientSocketPoolBaseHelper, since the "Group" holds a pointer
193 // |backup_task| that it will try to deref during the destructor, but 194 // |backup_task| that it will try to deref during the destructor, but
194 // depending on the order that pending tasks were deleted in, it might 195 // depending on the order that pending tasks were deleted in, it might
195 // already be invalid! See http://crbug.com/43291. 196 // already be invalid! See http://crbug.com/43291.
196 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask()); 197 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask());
197 MessageLoop::current()->Run(); 198 MessageLoop::current()->Run();
198 } 199 }
199 200
200 } // namespace 201 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698