Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1953)

Unified Diff: content/renderer/render_view_impl.cc

Issue 24503004: Show IDN in error screens (DNS failure etc.) (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/test/net/url_request_failed_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
===================================================================
--- content/renderer/render_view_impl.cc (revision 226965)
+++ content/renderer/render_view_impl.cc (working copy)
@@ -2197,7 +2197,8 @@
error_html = &html;
} else {
GetContentClient()->renderer()->GetNavigationErrorStrings(
- frame, failed_request, error, &alt_html, NULL);
+ frame, failed_request, error, renderer_preferences_.accept_languages,
+ &alt_html, NULL);
error_html = &alt_html;
}
@@ -3151,6 +3152,10 @@
return ssl_status;
}
+const std::string& RenderViewImpl::GetAcceptLanguages() const {
+ return renderer_preferences_.accept_languages;
+}
+
WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation(
WebFrame* frame, WebDataSource::ExtraData* extraData,
const WebURLRequest& request, WebNavigationType type,
@@ -3641,6 +3646,7 @@
frame,
failed_request,
error,
+ renderer_preferences_.accept_languages,
NULL,
&params.error_description);
params.url = error.unreachableURL;
@@ -3895,6 +3901,7 @@
frame,
failed_request,
error,
+ renderer_preferences_.accept_languages,
NULL,
&error_description);
Send(new ViewHostMsg_DidFailLoadWithError(routing_id_,
@@ -4591,6 +4598,8 @@
remove_params.ClearQuery();
remove_params.ClearRef();
const GURL url_to_send = failed_url.ReplaceComponents(remove_params);
+ // TODO(yuusuke): change to net::FormatUrl when link doctor
+ // becomes unicode-capable.
std::string spec_to_send = url_to_send.spec();
// Notify link doctor of the url truncation by sending of "?" at the end.
if (failed_url.has_query())
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/test/net/url_request_failed_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698