From d599aea151a5c7753e7eb1fc1a2c2b5953ac580b Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Fri, 15 Jun 2018 12:38:30 +0200 Subject: 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 --- src/core/net/custom_protocol_handler.cpp | 6 +++--- src/core/net/custom_protocol_handler.h | 6 +++--- src/core/net/network_delegate_qt.cpp | 2 +- src/core/net/ssl_host_state_delegate_qt.h | 2 +- src/core/net/url_request_custom_job.cpp | 4 ++-- src/core/net/url_request_custom_job.h | 4 ++-- src/core/net/url_request_custom_job_proxy.cpp | 10 +++++----- src/core/net/url_request_custom_job_proxy.h | 6 +++--- 8 files changed, 20 insertions(+), 20 deletions(-) (limited to 'src/core/net') 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 adapter) - : m_adapter(adapter) +CustomProtocolHandler::CustomProtocolHandler(QPointer 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 adapter); + CustomProtocolHandler(QPointer profileAdapter); net::URLRequestJob *MaybeCreateJob(net::URLRequest *request, net::NetworkDelegate *networkDelegate) const override; private: DISALLOW_COPY_AND_ASSIGN(CustomProtocolHandler); - QPointer m_adapter; + QPointer 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 adapter) + QPointer 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 adapter); + QPointer 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 adapter) + QPointer 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 adapter); + QPointer profileAdapter); ~URLRequestCustomJobProxy(); // Called from URLRequestCustomJobDelegate via post: @@ -82,7 +82,7 @@ public: // UI thread owned: std::string m_scheme; URLRequestCustomJobDelegate *m_delegate; - QPointer m_adapter; + QPointer m_profileAdapter; }; } // namespace QtWebEngineCore -- cgit v1.2.3