| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 session_params.proxy_service = proxy_service(); | 125 session_params.proxy_service = proxy_service(); |
| 126 session_params.ssl_config_service = ssl_config_service(); | 126 session_params.ssl_config_service = ssl_config_service(); |
| 127 session_params.http_auth_handler_factory = http_auth_handler_factory(); | 127 session_params.http_auth_handler_factory = http_auth_handler_factory(); |
| 128 session_params.http_server_properties = http_server_properties(); | 128 session_params.http_server_properties = http_server_properties(); |
| 129 session_params.net_log = net_log; | 129 session_params.net_log = net_log; |
| 130 scoped_refptr<net::HttpNetworkSession> network_session( | 130 scoped_refptr<net::HttpNetworkSession> network_session( |
| 131 new net::HttpNetworkSession(session_params)); | 131 new net::HttpNetworkSession(session_params)); |
| 132 storage_.set_http_transaction_factory(new net::HttpCache( | 132 storage_.set_http_transaction_factory(new net::HttpCache( |
| 133 network_session.get(), net::HttpCache::DefaultBackend::InMemory(0))); | 133 network_session.get(), net::HttpCache::DefaultBackend::InMemory(0))); |
| 134 // In-memory cookie store. | 134 // In-memory cookie store. |
| 135 storage_.set_cookie_store(content::CreateInMemoryCookieStore(NULL)); | 135 storage_.set_cookie_store( |
| 136 content::CreateCookieStore(content::CookieStoreConfig())); |
| 136 | 137 |
| 137 return net::OK; | 138 return net::OK; |
| 138 } | 139 } |
| 139 | 140 |
| 140 private: | 141 private: |
| 141 // Creates a host resolver for |experiment|. On success returns net::OK and | 142 // Creates a host resolver for |experiment|. On success returns net::OK and |
| 142 // fills |host_resolver| with a new pointer. Otherwise returns a network | 143 // fills |host_resolver| with a new pointer. Otherwise returns a network |
| 143 // error code. | 144 // error code. |
| 144 int CreateHostResolver( | 145 int CreateHostResolver( |
| 145 ConnectionTester::HostResolverExperiment experiment, | 146 ConnectionTester::HostResolverExperiment experiment, |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 | 534 |
| 534 // Notify the delegate of completion. | 535 // Notify the delegate of completion. |
| 535 delegate_->OnCompletedConnectionTestExperiment(current, result); | 536 delegate_->OnCompletedConnectionTestExperiment(current, result); |
| 536 | 537 |
| 537 if (remaining_experiments_.empty()) { | 538 if (remaining_experiments_.empty()) { |
| 538 delegate_->OnCompletedConnectionTestSuite(); | 539 delegate_->OnCompletedConnectionTestSuite(); |
| 539 } else { | 540 } else { |
| 540 StartNextExperiment(); | 541 StartNextExperiment(); |
| 541 } | 542 } |
| 542 } | 543 } |
| OLD | NEW |