summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@theqtcompany.com>2015-05-11 16:58:58 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-05-12 08:51:14 +0000
commit9b42c2b1275e61e4533f59157d4114509d46be55 (patch)
treeef5866668e865171beb587954b7068ffbc6e76c8
parent4db8c2c92ae8bc722de70e4bd317dce17dea2f74 (diff)
Remove unneeded ResourceContextQt::set_url_request_context_getter
This is an ancient relic that can be removed. Change-Id: Ia6926fff65d0e4d0769de940516866a2c51d9a0c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
-rw-r--r--src/core/browser_context_qt.cpp3
-rw-r--r--src/core/resource_context_qt.cpp11
-rw-r--r--src/core/resource_context_qt.h5
3 files changed, 3 insertions, 16 deletions
diff --git a/src/core/browser_context_qt.cpp b/src/core/browser_context_qt.cpp
index 3fa0f672..7f285b1e 100644
--- a/src/core/browser_context_qt.cpp
+++ b/src/core/browser_context_qt.cpp
@@ -78,7 +78,7 @@ bool BrowserContextQt::IsOffTheRecord() const
net::URLRequestContextGetter *BrowserContextQt::GetRequestContext()
{
- return GetDefaultStoragePartition(this)->GetURLRequestContext();
+ return url_request_getter_.get();
}
net::URLRequestContextGetter *BrowserContextQt::GetRequestContextForRenderProcess(int)
@@ -137,7 +137,6 @@ content::SSLHostStateDelegate* BrowserContextQt::GetSSLHostStateDelegate()
net::URLRequestContextGetter *BrowserContextQt::CreateRequestContext(content::ProtocolHandlerMap *protocol_handlers)
{
url_request_getter_ = new URLRequestContextGetterQt(m_adapter, protocol_handlers);
- static_cast<ResourceContextQt*>(GetResourceContext())->set_url_request_context_getter(url_request_getter_.get());
return url_request_getter_.get();
}
diff --git a/src/core/resource_context_qt.cpp b/src/core/resource_context_qt.cpp
index acd8ba4b..715d92aa 100644
--- a/src/core/resource_context_qt.cpp
+++ b/src/core/resource_context_qt.cpp
@@ -44,20 +44,13 @@ namespace QtWebEngineCore {
net::HostResolver *ResourceContextQt::GetHostResolver()
{
- CHECK(getter_);
- return getter_->GetURLRequestContext()->host_resolver();
+ return GetRequestContext()->host_resolver();
}
net::URLRequestContext* ResourceContextQt::GetRequestContext()
{
- if (getter_)
- return getter_->GetURLRequestContext();
+ Q_ASSERT(context);
return context->GetRequestContext()->GetURLRequestContext();
}
-void ResourceContextQt::set_url_request_context_getter(net::URLRequestContextGetter *getter)
-{
- getter_ = getter;
-}
-
} // namespace QtWebEngineCore
diff --git a/src/core/resource_context_qt.h b/src/core/resource_context_qt.h
index 48dc3d58..22bceb8e 100644
--- a/src/core/resource_context_qt.h
+++ b/src/core/resource_context_qt.h
@@ -55,18 +55,13 @@ class ResourceContextQt : public content::ResourceContext
public:
ResourceContextQt(BrowserContextQt *ctx)
: context(ctx)
- , getter_(0)
{}
virtual net::HostResolver* GetHostResolver() Q_DECL_OVERRIDE;
virtual net::URLRequestContext* GetRequestContext() Q_DECL_OVERRIDE;
-
- void set_url_request_context_getter(net::URLRequestContextGetter* getter);
-
private:
BrowserContextQt *context;
- net::URLRequestContextGetter* getter_;
DISALLOW_COPY_AND_ASSIGN(ResourceContextQt);
};