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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 13270005: Display DNS probe results. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix FilePath initalization on Windows Created 7 years, 7 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
Index: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 2ace978b9fc6631e39009a547d62dee2465ebe6a..232bc5bd35cd4e140b7599b12290822e8e6fe200 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -809,7 +809,7 @@ bool ChromeContentRendererClient::HasErrorPage(int http_status_code,
}
void ChromeContentRendererClient::GetNavigationErrorStrings(
- WebKit::WebFrame* /* frame */,
+ WebKit::WebFrame* frame,
const WebKit::WebURLRequest& failed_request,
const WebKit::WebURLError& error,
std::string* error_html,
@@ -837,11 +837,14 @@ void ChromeContentRendererClient::GetNavigationErrorStrings(
// error messages?
resource_id = IDR_ERROR_APP_HTML;
} else {
- LocalizedError::GetStrings(
- error,
- is_post,
- RenderThread::Get()->GetLocale(),
- &error_strings);
+ const std::string locale = RenderThread::Get()->GetLocale();
+ if (NetErrorHelper::GetErrorStringsForDnsProbe(
+ frame, error, is_post, locale, &error_strings)) {
+ // We got error strings for the "DNS probe possible" page.
+ // NetErrorHelper will update it later.
+ } else {
+ LocalizedError::GetStrings(error, is_post, locale, &error_strings);
+ }
resource_id = IDR_NET_ERROR_HTML;
}

Powered by Google App Engine
This is Rietveld 408576698