summaryrefslogtreecommitdiffstats
path: root/src/core/url_request_context_getter_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/url_request_context_getter_qt.cpp')
-rw-r--r--src/core/url_request_context_getter_qt.cpp39
1 files changed, 20 insertions, 19 deletions
diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp
index 42c8db280..4ca2c4b60 100644
--- a/src/core/url_request_context_getter_qt.cpp
+++ b/src/core/url_request_context_getter_qt.cpp
@@ -226,7 +226,7 @@ void URLRequestContextGetterQt::generateStorage()
m_storage->set_cert_verifier(net::CertVerifier::CreateDefault());
- scoped_ptr<net::HostResolver> host_resolver(net::HostResolver::CreateDefaultResolver(NULL));
+ std::unique_ptr<net::HostResolver> host_resolver(net::HostResolver::CreateDefaultResolver(NULL));
// The System Proxy Resolver has issues on Windows with unconfigured network cards,
// which is why we want to use the v8 one
@@ -234,7 +234,7 @@ void URLRequestContextGetterQt::generateStorage()
m_dhcpProxyScriptFetcherFactory.reset(new net::DhcpProxyScriptFetcherFactory);
m_storage->set_proxy_service(net::CreateProxyServiceUsingV8ProxyResolver(
- scoped_ptr<net::ProxyConfigService>(proxyConfigService),
+ std::unique_ptr<net::ProxyConfigService>(proxyConfigService),
new net::ProxyScriptFetcherImpl(m_urlRequestContext.get()),
m_dhcpProxyScriptFetcherFactory->Create(m_urlRequestContext.get()),
host_resolver.get(),
@@ -242,10 +242,10 @@ void URLRequestContextGetterQt::generateStorage()
m_networkDelegate.get()));
m_storage->set_ssl_config_service(new net::SSLConfigServiceDefaults);
- m_storage->set_transport_security_state(scoped_ptr<net::TransportSecurityState>(new net::TransportSecurityState()));
+ m_storage->set_transport_security_state(std::unique_ptr<net::TransportSecurityState>(new net::TransportSecurityState()));
m_storage->set_http_auth_handler_factory(net::HttpAuthHandlerFactory::CreateDefault(host_resolver.get()));
- m_storage->set_http_server_properties(scoped_ptr<net::HttpServerProperties>(new net::HttpServerPropertiesImpl));
+ m_storage->set_http_server_properties(std::unique_ptr<net::HttpServerProperties>(new net::HttpServerPropertiesImpl));
// Give |m_storage| ownership at the end in case it's |mapped_host_resolver|.
m_storage->set_host_resolver(std::move(host_resolver));
@@ -284,7 +284,7 @@ void URLRequestContextGetterQt::generateCookieStore()
}
m_storage->set_channel_id_service(
- scoped_ptr<net::ChannelIDService>(new net::ChannelIDService(
+ base::WrapUnique(new net::ChannelIDService(
new net::DefaultChannelIDStore(channel_id_db.get()),
base::WorkerPool::GetTaskRunner(true))));
@@ -292,7 +292,7 @@ void URLRequestContextGetterQt::generateCookieStore()
m_storage->set_cookie_store(0);
m_cookieDelegate->setCookieMonster(0);
- scoped_ptr<net::CookieStore> cookieStore;
+ std::unique_ptr<net::CookieStore> cookieStore;
switch (m_persistentCookiesPolicy) {
case BrowserContextAdapter::NoPersistentCookies:
cookieStore =
@@ -324,6 +324,7 @@ void URLRequestContextGetterQt::generateCookieStore()
}
net::CookieMonster * const cookieMonster = static_cast<net::CookieMonster*>(cookieStore.get());
+ cookieStore->SetChannelIDServiceID(m_urlRequestContext->channel_id_service()->GetUniqueID());
m_storage->set_cookie_store(std::move(cookieStore));
const std::vector<std::string> cookieableSchemes(kCookieableSchemes, kCookieableSchemes + arraysize(kCookieableSchemes));
@@ -354,7 +355,7 @@ void URLRequestContextGetterQt::generateUserAgent()
QMutexLocker lock(&m_mutex);
m_updateUserAgent = true;
- m_storage->set_http_user_agent_settings(scoped_ptr<net::HttpUserAgentSettings>(
+ m_storage->set_http_user_agent_settings(std::unique_ptr<net::HttpUserAgentSettings>(
new net::StaticHttpUserAgentSettings(m_httpAcceptLanguage.toStdString(), m_httpUserAgent.toStdString())));
}
@@ -482,9 +483,9 @@ void URLRequestContextGetterQt::generateHttpCache()
m_httpNetworkSession.reset(new net::HttpNetworkSession(network_session_params));
}
- cache = new net::HttpCache(m_httpNetworkSession.get(), scoped_ptr<net::HttpCache::DefaultBackend>(main_backend), false);
+ cache = new net::HttpCache(m_httpNetworkSession.get(), std::unique_ptr<net::HttpCache::DefaultBackend>(main_backend), false);
- m_storage->set_http_transaction_factory(scoped_ptr<net::HttpCache>(cache));
+ m_storage->set_http_transaction_factory(std::unique_ptr<net::HttpCache>(cache));
}
void URLRequestContextGetterQt::clearHttpCache()
@@ -513,36 +514,36 @@ void URLRequestContextGetterQt::generateJobFactory()
QMutexLocker lock(&m_mutex);
m_updateJobFactory = false;
- scoped_ptr<net::URLRequestJobFactoryImpl> jobFactory(new net::URLRequestJobFactoryImpl());
+ std::unique_ptr<net::URLRequestJobFactoryImpl> jobFactory(new net::URLRequestJobFactoryImpl());
{
// Chromium has a few protocol handlers ready for us, only pick blob: and throw away the rest.
content::ProtocolHandlerMap::iterator it = m_protocolHandlers.find(url::kBlobScheme);
Q_ASSERT(it != m_protocolHandlers.end());
- jobFactory->SetProtocolHandler(it->first, scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(it->second.release()));
+ jobFactory->SetProtocolHandler(it->first, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(it->second.release()));
m_protocolHandlers.clear();
}
- jobFactory->SetProtocolHandler(url::kDataScheme, scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::DataProtocolHandler()));
- jobFactory->SetProtocolHandler(url::kFileScheme, scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::FileProtocolHandler(
+ jobFactory->SetProtocolHandler(url::kDataScheme, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::DataProtocolHandler()));
+ jobFactory->SetProtocolHandler(url::kFileScheme, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::FileProtocolHandler(
content::BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior(
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))));
- jobFactory->SetProtocolHandler(kQrcSchemeQt, scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new QrcProtocolHandlerQt()));
+ jobFactory->SetProtocolHandler(kQrcSchemeQt, std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new QrcProtocolHandlerQt()));
jobFactory->SetProtocolHandler(url::kFtpScheme,
- scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::FtpProtocolHandler(new net::FtpNetworkLayer(m_urlRequestContext->host_resolver()))));
+ std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::FtpProtocolHandler(new net::FtpNetworkLayer(m_urlRequestContext->host_resolver()))));
m_installedCustomSchemes = m_customUrlSchemes;
Q_FOREACH (const QByteArray &scheme, m_installedCustomSchemes) {
- jobFactory->SetProtocolHandler(scheme.toStdString(), scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new CustomProtocolHandler(m_browserContext)));
+ jobFactory->SetProtocolHandler(scheme.toStdString(), std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new CustomProtocolHandler(m_browserContext)));
}
m_baseJobFactory = jobFactory.get();
// Set up interceptors in the reverse order.
- scoped_ptr<net::URLRequestJobFactory> topJobFactory = std::move(jobFactory);
+ std::unique_ptr<net::URLRequestJobFactory> topJobFactory = std::move(jobFactory);
for (content::URLRequestInterceptorScopedVector::reverse_iterator i = m_requestInterceptors.rbegin(); i != m_requestInterceptors.rend(); ++i)
- topJobFactory.reset(new net::URLRequestInterceptingJobFactory(std::move(topJobFactory), make_scoped_ptr(*i)));
+ topJobFactory.reset(new net::URLRequestInterceptingJobFactory(std::move(topJobFactory), std::unique_ptr<net::URLRequestInterceptor>(*i)));
m_requestInterceptors.weak_clear();
@@ -570,7 +571,7 @@ void URLRequestContextGetterQt::regenerateJobFactory()
m_installedCustomSchemes = m_customUrlSchemes;
Q_FOREACH (const QByteArray &scheme, m_installedCustomSchemes) {
- m_baseJobFactory->SetProtocolHandler(scheme.toStdString(), scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new CustomProtocolHandler(m_browserContext)));
+ m_baseJobFactory->SetProtocolHandler(scheme.toStdString(), std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler>(new CustomProtocolHandler(m_browserContext)));
}
}