diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-11-04 13:20:57 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-11-13 21:16:28 +0100 |
commit | 6b25e22685cfe434bb17db006c33db7341ca7028 (patch) | |
tree | 3691ca5d33b3497940fd66e4d44b538367a00622 /src/core/net/url_request_notification.cpp | |
parent | 723a0d074ef96083eecae58d3dbed78339a68402 (diff) |
Code-style cleanup in src/core/net
Picking suggested changes for a clang-format run.
Change-Id: I3539dee65f153257015af4a8670312e74980a9e4
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/core/net/url_request_notification.cpp')
-rw-r--r-- | src/core/net/url_request_notification.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/core/net/url_request_notification.cpp b/src/core/net/url_request_notification.cpp index 9d309e314..fa6d61f65 100644 --- a/src/core/net/url_request_notification.cpp +++ b/src/core/net/url_request_notification.cpp @@ -53,11 +53,13 @@ namespace QtWebEngineCore { // Calls cancel() when the URLRequest is destroyed. -class UserData : public base::SupportsUserData::Data { +class UserData : public base::SupportsUserData::Data +{ public: UserData(URLRequestNotification *ptr) : m_ptr(ptr) {} ~UserData() { m_ptr->cancel(); } static const char key[]; + private: URLRequestNotification *m_ptr; }; @@ -69,13 +71,10 @@ static content::ResourceType fromQt(QWebEngineUrlRequestInfo::ResourceType resou return static_cast<content::ResourceType>(resourceType); } -URLRequestNotification::URLRequestNotification(net::URLRequest *request, - bool isMainFrameRequest, - GURL *newUrl, - QWebEngineUrlRequestInfo &&requestInfo, - content::ResourceRequestInfo::WebContentsGetter webContentsGetter, - net::CompletionOnceCallback callback, - QPointer<ProfileAdapter> adapter) +URLRequestNotification::URLRequestNotification(net::URLRequest *request, bool isMainFrameRequest, GURL *newUrl, + QWebEngineUrlRequestInfo &&requestInfo, + content::ResourceRequestInfo::WebContentsGetter webContentsGetter, + net::CompletionOnceCallback callback, QPointer<ProfileAdapter> adapter) : m_request(request) , m_isMainFrameRequest(isMainFrameRequest) , m_newUrl(newUrl) @@ -108,7 +107,7 @@ void URLRequestNotification::notify() if (webContents) { if (m_profileAdapter && m_profileAdapter->requestInterceptor()) { - QWebEngineUrlRequestInterceptor* interceptor = m_profileAdapter->requestInterceptor(); + QWebEngineUrlRequestInterceptor *interceptor = m_profileAdapter->requestInterceptor(); if (!interceptor->property("deprecated").toBool()) interceptor->interceptRequest(m_requestInfo); } @@ -152,7 +151,7 @@ void URLRequestNotification::notify() base::BindOnce(&URLRequestNotification::complete, base::Unretained(this), result)); } -void URLRequestNotification::cancel() +void URLRequestNotification::cancel() { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); |