| 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 <memory> | 5 #include <memory> | 
| 6 #include <utility> | 6 #include <utility> | 
| 7 | 7 | 
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" | 
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" | 
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" | 
| (...skipping 9488 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 9499 | 9499 | 
| 9500     r->Start(); | 9500     r->Start(); | 
| 9501     EXPECT_TRUE(r->is_pending()); | 9501     EXPECT_TRUE(r->is_pending()); | 
| 9502 | 9502 | 
| 9503     base::RunLoop().Run(); | 9503     base::RunLoop().Run(); | 
| 9504 | 9504 | 
| 9505     EXPECT_EQ(1, d.response_started_count()); | 9505     EXPECT_EQ(1, d.response_started_count()); | 
| 9506   } | 9506   } | 
| 9507 | 9507 | 
| 9508   // Now create a new HttpCache with a different ssl_session_cache_shard value. | 9508   // Now create a new HttpCache with a different ssl_session_cache_shard value. | 
| 9509   HttpNetworkSession::Params params; | 9509   HttpNetworkSession::Context session_context; | 
| 9510   params.host_resolver = default_context_.host_resolver(); | 9510   session_context.host_resolver = default_context_.host_resolver(); | 
| 9511   params.cert_verifier = default_context_.cert_verifier(); | 9511   session_context.cert_verifier = default_context_.cert_verifier(); | 
| 9512   params.transport_security_state = default_context_.transport_security_state(); | 9512   session_context.transport_security_state = | 
| 9513   params.cert_transparency_verifier = | 9513       default_context_.transport_security_state(); | 
|  | 9514   session_context.cert_transparency_verifier = | 
| 9514       default_context_.cert_transparency_verifier(); | 9515       default_context_.cert_transparency_verifier(); | 
| 9515   params.ct_policy_enforcer = default_context_.ct_policy_enforcer(); | 9516   session_context.ct_policy_enforcer = default_context_.ct_policy_enforcer(); | 
| 9516   params.proxy_service = default_context_.proxy_service(); | 9517   session_context.proxy_service = default_context_.proxy_service(); | 
| 9517   params.ssl_config_service = default_context_.ssl_config_service(); | 9518   session_context.ssl_config_service = default_context_.ssl_config_service(); | 
| 9518   params.http_auth_handler_factory = | 9519   session_context.http_auth_handler_factory = | 
| 9519       default_context_.http_auth_handler_factory(); | 9520       default_context_.http_auth_handler_factory(); | 
| 9520   params.http_server_properties = default_context_.http_server_properties(); | 9521   session_context.http_server_properties = | 
|  | 9522       default_context_.http_server_properties(); | 
| 9521 | 9523 | 
| 9522   HttpNetworkSession network_session(params); | 9524   HttpNetworkSession network_session(HttpNetworkSession::Params(), | 
|  | 9525                                      session_context); | 
| 9523   std::unique_ptr<HttpCache> cache( | 9526   std::unique_ptr<HttpCache> cache( | 
| 9524       new HttpCache(&network_session, HttpCache::DefaultBackend::InMemory(0), | 9527       new HttpCache(&network_session, HttpCache::DefaultBackend::InMemory(0), | 
| 9525                     false /* is_main_cache */)); | 9528                     false /* is_main_cache */)); | 
| 9526 | 9529 | 
| 9527   default_context_.set_http_transaction_factory(cache.get()); | 9530   default_context_.set_http_transaction_factory(cache.get()); | 
| 9528 | 9531 | 
| 9529   { | 9532   { | 
| 9530     TestDelegate d; | 9533     TestDelegate d; | 
| 9531     std::unique_ptr<URLRequest> r(default_context_.CreateRequest( | 9534     std::unique_ptr<URLRequest> r(default_context_.CreateRequest( | 
| 9532         test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d, | 9535         test_server.GetURL("ssl-session-cache"), DEFAULT_PRIORITY, &d, | 
| (...skipping 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 11230   AddTestInterceptor()->set_main_intercept_job(std::move(job)); | 11233   AddTestInterceptor()->set_main_intercept_job(std::move(job)); | 
| 11231 | 11234 | 
| 11232   req->Start(); | 11235   req->Start(); | 
| 11233   req->Cancel(); | 11236   req->Cancel(); | 
| 11234   base::RunLoop().RunUntilIdle(); | 11237   base::RunLoop().RunUntilIdle(); | 
| 11235   EXPECT_EQ(ERR_ABORTED, d.request_status()); | 11238   EXPECT_EQ(ERR_ABORTED, d.request_status()); | 
| 11236   EXPECT_EQ(0, d.received_redirect_count()); | 11239   EXPECT_EQ(0, d.received_redirect_count()); | 
| 11237 } | 11240 } | 
| 11238 | 11241 | 
| 11239 }  // namespace net | 11242 }  // namespace net | 
| OLD | NEW | 
|---|