summaryrefslogtreecommitdiffstats
path: root/src/core/net
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2018-06-15 12:38:30 +0200
committerMichal Klocek <michal.klocek@qt.io>2018-07-09 19:22:11 +0000
commitd599aea151a5c7753e7eb1fc1a2c2b5953ac580b (patch)
tree3563522c3c15e4043a8e8a0023cb2f21a9709891 /src/core/net
parent10877c3ec0184e6c2a07b8775d32c8efc38a29a3 (diff)
Rename BrowserContextAdapter to ProfileAdapter
Follow change of BrowserContextQt to ProfileQt. Fix wrong naming usage of browserContext instead of browserContextAdapter. Change-Id: I75fdac685d9bffd44f0144921d3e87305d6d44c9 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/core/net')
-rw-r--r--src/core/net/custom_protocol_handler.cpp6
-rw-r--r--src/core/net/custom_protocol_handler.h6
-rw-r--r--src/core/net/network_delegate_qt.cpp2
-rw-r--r--src/core/net/ssl_host_state_delegate_qt.h2
-rw-r--r--src/core/net/url_request_custom_job.cpp4
-rw-r--r--src/core/net/url_request_custom_job.h4
-rw-r--r--src/core/net/url_request_custom_job_proxy.cpp10
-rw-r--r--src/core/net/url_request_custom_job_proxy.h6
8 files changed, 20 insertions, 20 deletions
diff --git a/src/core/net/custom_protocol_handler.cpp b/src/core/net/custom_protocol_handler.cpp
index 3620bc10c..5132782c2 100644
--- a/src/core/net/custom_protocol_handler.cpp
+++ b/src/core/net/custom_protocol_handler.cpp
@@ -46,8 +46,8 @@
namespace QtWebEngineCore {
-CustomProtocolHandler::CustomProtocolHandler(QPointer<BrowserContextAdapter> adapter)
- : m_adapter(adapter)
+CustomProtocolHandler::CustomProtocolHandler(QPointer<ProfileAdapter> profileAdapter)
+ : m_profileAdapter(profileAdapter)
{
}
@@ -56,7 +56,7 @@ net::URLRequestJob *CustomProtocolHandler::MaybeCreateJob(net::URLRequest *reque
if (!networkDelegate)
return new net::URLRequestErrorJob(request, Q_NULLPTR, net::ERR_ACCESS_DENIED);
- return new URLRequestCustomJob(request, networkDelegate, request->url().scheme(), m_adapter);
+ return new URLRequestCustomJob(request, networkDelegate, request->url().scheme(), m_profileAdapter);
}
} // namespace
diff --git a/src/core/net/custom_protocol_handler.h b/src/core/net/custom_protocol_handler.h
index 3869af143..d5b512b03 100644
--- a/src/core/net/custom_protocol_handler.h
+++ b/src/core/net/custom_protocol_handler.h
@@ -67,20 +67,20 @@ class URLRequestJob;
namespace QtWebEngineCore {
-class BrowserContextAdapter;
+class ProfileAdapter;
// Implements a ProtocolHandler for custom URL schemes.
// If |network_delegate_| is NULL then all file requests will fail with ERR_ACCESS_DENIED.
class QWEBENGINECORE_PRIVATE_EXPORT CustomProtocolHandler : public net::URLRequestJobFactory::ProtocolHandler {
public:
- CustomProtocolHandler(QPointer<BrowserContextAdapter> adapter);
+ CustomProtocolHandler(QPointer<ProfileAdapter> profileAdapter);
net::URLRequestJob *MaybeCreateJob(net::URLRequest *request, net::NetworkDelegate *networkDelegate) const override;
private:
DISALLOW_COPY_AND_ASSIGN(CustomProtocolHandler);
- QPointer<BrowserContextAdapter> m_adapter;
+ QPointer<ProfileAdapter> m_profileAdapter;
};
} // namespace
diff --git a/src/core/net/network_delegate_qt.cpp b/src/core/net/network_delegate_qt.cpp
index a67baf96f..580f202e5 100644
--- a/src/core/net/network_delegate_qt.cpp
+++ b/src/core/net/network_delegate_qt.cpp
@@ -39,7 +39,7 @@
#include "network_delegate_qt.h"
-#include "browser_context_adapter.h"
+#include "profile_adapter.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/resource_request_info.h"
diff --git a/src/core/net/ssl_host_state_delegate_qt.h b/src/core/net/ssl_host_state_delegate_qt.h
index 3ebabb601..aeccb42fd 100644
--- a/src/core/net/ssl_host_state_delegate_qt.h
+++ b/src/core/net/ssl_host_state_delegate_qt.h
@@ -41,7 +41,7 @@
#define SSL_HOST_STATE_DELEGATE_QT_H
#include "content/public/browser/ssl_host_state_delegate.h"
-#include "browser_context_adapter.h"
+#include "profile_adapter.h"
namespace QtWebEngineCore {
diff --git a/src/core/net/url_request_custom_job.cpp b/src/core/net/url_request_custom_job.cpp
index d9337687b..c69fb1808 100644
--- a/src/core/net/url_request_custom_job.cpp
+++ b/src/core/net/url_request_custom_job.cpp
@@ -51,9 +51,9 @@ namespace QtWebEngineCore {
URLRequestCustomJob::URLRequestCustomJob(URLRequest *request,
NetworkDelegate *networkDelegate,
const std::string &scheme,
- QPointer<BrowserContextAdapter> adapter)
+ QPointer<ProfileAdapter> profileAdapter)
: URLRequestJob(request, networkDelegate)
- , m_proxy(new URLRequestCustomJobProxy(this, scheme, adapter))
+ , m_proxy(new URLRequestCustomJobProxy(this, scheme, profileAdapter))
, m_device(nullptr)
, m_error(0)
, m_pendingReadSize(0)
diff --git a/src/core/net/url_request_custom_job.h b/src/core/net/url_request_custom_job.h
index 71c8d2613..cc997fc66 100644
--- a/src/core/net/url_request_custom_job.h
+++ b/src/core/net/url_request_custom_job.h
@@ -48,7 +48,7 @@ QT_FORWARD_DECLARE_CLASS(QIODevice)
namespace QtWebEngineCore {
-class BrowserContextAdapter;
+class ProfileAdapter;
class URLRequestCustomJobDelegate;
class URLRequestCustomJobProxy;
@@ -58,7 +58,7 @@ public:
URLRequestCustomJob(net::URLRequest *request,
net::NetworkDelegate *networkDelegate,
const std::string &scheme,
- QPointer<BrowserContextAdapter> adapter);
+ QPointer<ProfileAdapter> profileAdapter);
void Start() override;
void Kill() override;
int ReadRawData(net::IOBuffer *buf, int buf_size) override;
diff --git a/src/core/net/url_request_custom_job_proxy.cpp b/src/core/net/url_request_custom_job_proxy.cpp
index 38fbd7670..5280318ad 100644
--- a/src/core/net/url_request_custom_job_proxy.cpp
+++ b/src/core/net/url_request_custom_job_proxy.cpp
@@ -41,7 +41,7 @@
#include "url_request_custom_job.h"
#include "url_request_custom_job_delegate.h"
#include "api/qwebengineurlrequestjob.h"
-#include "browser_context_adapter.h"
+#include "profile_adapter.h"
#include "type_conversion.h"
#include "content/public/browser/browser_thread.h"
#include "web_engine_context.h"
@@ -52,12 +52,12 @@ namespace QtWebEngineCore {
URLRequestCustomJobProxy::URLRequestCustomJobProxy(URLRequestCustomJob *job,
const std::string &scheme,
- QPointer<BrowserContextAdapter> adapter)
+ QPointer<ProfileAdapter> profileAdapter)
: m_job(job)
, m_started(false)
, m_scheme(scheme)
, m_delegate(nullptr)
- , m_adapter(adapter)
+ , m_profileAdapter(profileAdapter)
{
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
}
@@ -163,8 +163,8 @@ void URLRequestCustomJobProxy::initialize(GURL url, std::string method, base::Op
QWebEngineUrlSchemeHandler *schemeHandler = nullptr;
- if (m_adapter)
- schemeHandler = m_adapter->customUrlSchemeHandlers()[toQByteArray(m_scheme)];
+ if (m_profileAdapter)
+ schemeHandler = m_profileAdapter->customUrlSchemeHandlers()[toQByteArray(m_scheme)];
if (schemeHandler) {
m_delegate = new URLRequestCustomJobDelegate(this, toQt(url),
diff --git a/src/core/net/url_request_custom_job_proxy.h b/src/core/net/url_request_custom_job_proxy.h
index 34d526348..3986fe119 100644
--- a/src/core/net/url_request_custom_job_proxy.h
+++ b/src/core/net/url_request_custom_job_proxy.h
@@ -52,7 +52,7 @@ namespace QtWebEngineCore {
class URLRequestCustomJob;
class URLRequestCustomJobDelegate;
-class BrowserContextAdapter;
+class ProfileAdapter;
// Used to comunicate between URLRequestCustomJob living on the IO thread
// and URLRequestCustomJobDelegate living on the UI thread.
@@ -62,7 +62,7 @@ class URLRequestCustomJobProxy
public:
URLRequestCustomJobProxy(URLRequestCustomJob *job,
const std::string &scheme,
- QPointer<BrowserContextAdapter> adapter);
+ QPointer<ProfileAdapter> profileAdapter);
~URLRequestCustomJobProxy();
// Called from URLRequestCustomJobDelegate via post:
@@ -82,7 +82,7 @@ public:
// UI thread owned:
std::string m_scheme;
URLRequestCustomJobDelegate *m_delegate;
- QPointer<BrowserContextAdapter> m_adapter;
+ QPointer<ProfileAdapter> m_profileAdapter;
};
} // namespace QtWebEngineCore