diff options
Diffstat (limited to 'src/core/url_request_context_getter_qt.cpp')
-rw-r--r-- | src/core/url_request_context_getter_qt.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp index 1f3d6fcbe..8a6717e91 100644 --- a/src/core/url_request_context_getter_qt.cpp +++ b/src/core/url_request_context_getter_qt.cpp @@ -189,9 +189,9 @@ void URLRequestContextGetterQt::cancelAllUrlRequests() Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); Q_ASSERT(m_urlRequestContext); - std::set<const net::URLRequest*>* url_requests = m_urlRequestContext->url_requests(); - std::set<const net::URLRequest*>::const_iterator it = url_requests->begin(); - std::set<const net::URLRequest*>::const_iterator end = url_requests->end(); + const std::set<const net::URLRequest*>& url_requests = m_urlRequestContext->url_requests(); + std::set<const net::URLRequest*>::const_iterator it = url_requests.begin(); + std::set<const net::URLRequest*>::const_iterator end = url_requests.end(); for ( ; it != end; ++it) { net::URLRequest* request = const_cast<net::URLRequest*>(*it); if (request) @@ -295,8 +295,7 @@ void URLRequestContextGetterQt::generateCookieStore() m_storage->set_channel_id_service( base::WrapUnique(new net::ChannelIDService( - new net::DefaultChannelIDStore(channel_id_db.get()), - base::WorkerPool::GetTaskRunner(true)))); + new net::DefaultChannelIDStore(channel_id_db.get())))); // Unset it first to get a chance to destroy and flush the old cookie store before opening a new on possibly the same file. m_storage->set_cookie_store(0); @@ -572,10 +571,11 @@ void URLRequestContextGetterQt::generateJobFactory() // Set up interceptors in the reverse order. 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), std::unique_ptr<net::URLRequestInterceptor>(*i))); + for (content::URLRequestInterceptorScopedVector::reverse_iterator i = m_requestInterceptors.rbegin(); i != m_requestInterceptors.rend(); ++i) { + topJobFactory.reset(new net::URLRequestInterceptingJobFactory(std::move(topJobFactory), std::move(*i))); + } - m_requestInterceptors.weak_clear(); + m_requestInterceptors.clear(); m_jobFactory = std::move(topJobFactory); |