summaryrefslogtreecommitdiffstats
path: root/src/core/renderer/content_renderer_client_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/renderer/content_renderer_client_qt.cpp')
-rw-r--r--src/core/renderer/content_renderer_client_qt.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/renderer/content_renderer_client_qt.cpp b/src/core/renderer/content_renderer_client_qt.cpp
index 04b5e2c22..4503520eb 100644
--- a/src/core/renderer/content_renderer_client_qt.cpp
+++ b/src/core/renderer/content_renderer_client_qt.cpp
@@ -91,7 +91,8 @@ public:
{
// mark qrc as a secure scheme (avoids deprecation warnings)
// Can only be done after blink is initialized.
- blink::WebSecurityPolicy::registerURLSchemeAsSecure(blink::WebString::fromLatin1(kQrcSchemeQt));
+ blink::WebString qrcScheme(base::ASCIIToUTF16(kQrcSchemeQt));
+ blink::WebSecurityPolicy::registerURLSchemeAsSecure(qrcScheme);
}
};
@@ -160,9 +161,8 @@ bool ContentRendererClientQt::ShouldSuppressErrorPage(content::RenderFrame *fram
}
// To tap into the chromium localized strings. Ripped from the chrome layer (highly simplified).
-void ContentRendererClientQt::GetNavigationErrorStrings(content::RenderView* renderView, blink::WebFrame *frame, const blink::WebURLRequest &failedRequest, const blink::WebURLError &error, std::string *errorHtml, base::string16 *errorDescription)
+void ContentRendererClientQt::GetNavigationErrorStrings(content::RenderFrame* renderFrame, const blink::WebURLRequest &failedRequest, const blink::WebURLError &error, std::string *errorHtml, base::string16 *errorDescription)
{
- Q_UNUSED(frame)
const bool isPost = QByteArray::fromStdString(failedRequest.httpMethod().utf8()) == QByteArrayLiteral("POST");
if (errorHtml) {
@@ -174,8 +174,8 @@ void ContentRendererClientQt::GetNavigationErrorStrings(content::RenderView* ren
// TODO(elproxy): We could potentially get better diagnostics here by first calling
// NetErrorHelper::GetErrorStringsForDnsProbe, but that one is harder to untangle.
LocalizedError::GetStrings(error.reason, error.domain.utf8(), error.unreachableURL, isPost
- , error.staleCopyInCache && !isPost, false, locale, renderView->GetAcceptLanguages()
- , scoped_ptr<error_page::ErrorPageParams>(), &errorStrings);
+ , error.staleCopyInCache && !isPost, false, error_page::OfflinePageStatus::NONE, locale, renderFrame->GetRenderView()->GetAcceptLanguages()
+ , scoped_ptr<error_page::ErrorPageParams>(), &errorStrings);
resourceId = IDR_NET_ERROR_HTML;
@@ -187,7 +187,7 @@ void ContentRendererClientQt::GetNavigationErrorStrings(content::RenderView* ren
}
if (errorDescription)
- *errorDescription = LocalizedError::GetErrorDetails(error, isPost);
+ *errorDescription = LocalizedError::GetErrorDetails(error.domain.utf8(), error.reason, isPost);
}
unsigned long long ContentRendererClientQt::VisitedLinkHash(const char *canonicalUrl, size_t length)