2012-06-28 19:21:18 +02:00
|
|
|
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that can
|
|
|
|
// be found in the LICENSE file.
|
|
|
|
|
2015-11-26 03:53:12 +01:00
|
|
|
#include "libcef/browser/net/url_request_context_proxy.h"
|
2012-06-28 19:21:18 +02:00
|
|
|
|
2015-11-26 03:53:12 +01:00
|
|
|
#include "libcef/browser/net/cookie_store_proxy.h"
|
2018-10-08 17:57:14 +02:00
|
|
|
#include "libcef/browser/net/cookie_store_source.h"
|
2015-11-26 03:53:12 +01:00
|
|
|
#include "libcef/browser/net/url_request_context_impl.h"
|
2012-06-28 19:21:18 +02:00
|
|
|
#include "libcef/browser/thread_util.h"
|
|
|
|
|
|
|
|
CefURLRequestContextProxy::CefURLRequestContextProxy(
|
2015-02-14 00:17:08 +01:00
|
|
|
CefURLRequestContextImpl* parent,
|
2013-09-03 18:43:31 +02:00
|
|
|
CefRefPtr<CefRequestContextHandler> handler) {
|
2012-06-28 19:21:18 +02:00
|
|
|
CEF_REQUIRE_IOT();
|
2015-03-02 21:25:14 +01:00
|
|
|
DCHECK(parent);
|
|
|
|
DCHECK(handler.get());
|
2012-06-28 19:21:18 +02:00
|
|
|
|
|
|
|
// Cookie store that proxies to the browser implementation.
|
2018-10-08 17:57:14 +02:00
|
|
|
cookie_store_proxy_.reset(new CefCookieStoreProxy(
|
|
|
|
std::make_unique<CefCookieStoreHandlerSource>(parent, handler)));
|
2014-09-27 01:48:19 +02:00
|
|
|
set_cookie_store(cookie_store_proxy_.get());
|
2012-06-28 19:21:18 +02:00
|
|
|
|
|
|
|
// All other values refer to the parent request context.
|
2015-02-14 00:17:08 +01:00
|
|
|
set_net_log(parent->net_log());
|
2017-11-15 23:21:34 +01:00
|
|
|
set_enable_brotli(parent->enable_brotli());
|
2015-02-14 00:17:08 +01:00
|
|
|
set_host_resolver(parent->host_resolver());
|
|
|
|
set_cert_verifier(parent->cert_verifier());
|
|
|
|
set_transport_security_state(parent->transport_security_state());
|
2017-01-31 21:25:12 +01:00
|
|
|
set_cert_transparency_verifier(parent->cert_transparency_verifier());
|
|
|
|
set_ct_policy_enforcer(parent->ct_policy_enforcer());
|
2015-02-14 00:17:08 +01:00
|
|
|
set_channel_id_service(parent->channel_id_service());
|
2018-03-20 21:15:08 +01:00
|
|
|
set_proxy_resolution_service(parent->proxy_resolution_service());
|
2015-02-14 00:17:08 +01:00
|
|
|
set_ssl_config_service(parent->ssl_config_service());
|
|
|
|
set_http_auth_handler_factory(parent->http_auth_handler_factory());
|
|
|
|
set_http_transaction_factory(parent->http_transaction_factory());
|
|
|
|
set_network_delegate(parent->network_delegate());
|
|
|
|
set_http_server_properties(parent->http_server_properties());
|
|
|
|
set_transport_security_state(parent->transport_security_state());
|
2012-11-16 03:58:25 +01:00
|
|
|
set_http_user_agent_settings(const_cast<net::HttpUserAgentSettings*>(
|
2015-02-14 00:17:08 +01:00
|
|
|
parent->http_user_agent_settings()));
|
|
|
|
set_job_factory(parent->job_factory());
|
|
|
|
}
|
|
|
|
|
|
|
|
CefURLRequestContextProxy::~CefURLRequestContextProxy() {
|
|
|
|
CEF_REQUIRE_IOT();
|
2012-06-28 19:21:18 +02:00
|
|
|
}
|