| 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 <utility> | 5 #include <utility> |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 8673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8684 | 8684 |
| 8685 // Now create a new HttpCache with a different ssl_session_cache_shard value. | 8685 // Now create a new HttpCache with a different ssl_session_cache_shard value. |
| 8686 HttpNetworkSession::Params params; | 8686 HttpNetworkSession::Params params; |
| 8687 params.host_resolver = default_context_.host_resolver(); | 8687 params.host_resolver = default_context_.host_resolver(); |
| 8688 params.cert_verifier = default_context_.cert_verifier(); | 8688 params.cert_verifier = default_context_.cert_verifier(); |
| 8689 params.transport_security_state = default_context_.transport_security_state(); | 8689 params.transport_security_state = default_context_.transport_security_state(); |
| 8690 params.proxy_service = default_context_.proxy_service(); | 8690 params.proxy_service = default_context_.proxy_service(); |
| 8691 params.ssl_config_service = default_context_.ssl_config_service(); | 8691 params.ssl_config_service = default_context_.ssl_config_service(); |
| 8692 params.http_auth_handler_factory = | 8692 params.http_auth_handler_factory = |
| 8693 default_context_.http_auth_handler_factory(); | 8693 default_context_.http_auth_handler_factory(); |
| 8694 params.network_delegate = &default_network_delegate_; | |
| 8695 params.http_server_properties = default_context_.http_server_properties(); | 8694 params.http_server_properties = default_context_.http_server_properties(); |
| 8696 | 8695 |
| 8697 HttpNetworkSession network_session(params); | 8696 HttpNetworkSession network_session(params); |
| 8698 scoped_ptr<HttpCache> cache(new HttpCache( | 8697 scoped_ptr<HttpCache> cache(new HttpCache( |
| 8699 &network_session, HttpCache::DefaultBackend::InMemory(0), false)); | 8698 &network_session, HttpCache::DefaultBackend::InMemory(0), false)); |
| 8700 | 8699 |
| 8701 default_context_.set_http_transaction_factory(cache.get()); | 8700 default_context_.set_http_transaction_factory(cache.get()); |
| 8702 | 8701 |
| 8703 { | 8702 { |
| 8704 TestDelegate d; | 8703 TestDelegate d; |
| (...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10015 AddTestInterceptor()->set_main_intercept_job(std::move(job)); | 10014 AddTestInterceptor()->set_main_intercept_job(std::move(job)); |
| 10016 | 10015 |
| 10017 req->Start(); | 10016 req->Start(); |
| 10018 req->Cancel(); | 10017 req->Cancel(); |
| 10019 base::RunLoop().RunUntilIdle(); | 10018 base::RunLoop().RunUntilIdle(); |
| 10020 EXPECT_EQ(URLRequestStatus::CANCELED, req->status().status()); | 10019 EXPECT_EQ(URLRequestStatus::CANCELED, req->status().status()); |
| 10021 EXPECT_EQ(0, d.received_redirect_count()); | 10020 EXPECT_EQ(0, d.received_redirect_count()); |
| 10022 } | 10021 } |
| 10023 | 10022 |
| 10024 } // namespace net | 10023 } // namespace net |
| OLD | NEW |