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

Unified Diff: trunk/src/chrome/renderer/chrome_content_renderer_client.cc

Issue 14369002: Revert 194514 - New network error page: Fix resubmit warning page (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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 | « trunk/src/chrome/common/localized_error.cc ('k') | trunk/src/chrome/renderer/net/net_error_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/chrome/renderer/chrome_content_renderer_client.cc
===================================================================
--- trunk/src/chrome/renderer/chrome_content_renderer_client.cc (revision 195011)
+++ trunk/src/chrome/renderer/chrome_content_renderer_client.cc (working copy)
@@ -828,6 +828,10 @@
string16* error_description) {
const GURL failed_url = error.unreachableURL;
const Extension* extension = NULL;
+ const bool is_repost =
+ error.reason == net::ERR_CACHE_MISS &&
+ error.domain == WebString::fromUTF8(net::kErrorDomain) &&
+ EqualsASCII(failed_request.httpMethod(), "POST");
if (failed_url.is_valid() &&
!failed_url.SchemeIs(extensions::kExtensionScheme)) {
@@ -835,8 +839,6 @@
ExtensionURLInfo(failed_url));
}
- bool is_post = EqualsASCII(failed_request.httpMethod(), "POST");
-
if (error_html) {
// Use a local error page.
int resource_id;
@@ -849,11 +851,12 @@
// error messages?
resource_id = IDR_ERROR_APP_HTML;
} else {
- LocalizedError::GetStrings(
- error,
- is_post,
- RenderThread::Get()->GetLocale(),
- &error_strings);
+ if (is_repost) {
+ LocalizedError::GetFormRepostStrings(failed_url, &error_strings);
+ } else {
+ LocalizedError::GetStrings(error, &error_strings,
+ RenderThread::Get()->GetLocale());
+ }
resource_id = IDR_NET_ERROR_HTML;
}
@@ -869,8 +872,8 @@
}
if (error_description) {
- if (!extension)
- *error_description = LocalizedError::GetErrorDetails(error, is_post);
+ if (!extension && !is_repost)
+ *error_description = LocalizedError::GetErrorDetails(error);
}
}
« no previous file with comments | « trunk/src/chrome/common/localized_error.cc ('k') | trunk/src/chrome/renderer/net/net_error_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698