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

Unified Diff: android_webview/renderer/aw_content_renderer_client.cc

Issue 16441002: [Android WebView] Fix error description setting for provisional load (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 7 years, 6 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 | « android_webview/javatests/src/org/chromium/android_webview/test/ClientOnReceivedErrorTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/renderer/aw_content_renderer_client.cc
diff --git a/android_webview/renderer/aw_content_renderer_client.cc b/android_webview/renderer/aw_content_renderer_client.cc
index 990e9eaca9cd9db01b5b8380787db2c15fa961c5..854833461b853e0162e68fa1c96bc7ace9e86c86 100644
--- a/android_webview/renderer/aw_content_renderer_client.cc
+++ b/android_webview/renderer/aw_content_renderer_client.cc
@@ -69,19 +69,21 @@ void AwContentRendererClient::GetNavigationErrorStrings(
std::string contents;
if (err.empty()) {
contents = AwResource::GetNoDomainPageContent();
- if (error_description)
- *error_description = ASCIIToUTF16(net::ErrorToString(error.reason));
} else {
contents = AwResource::GetLoadErrorPageContent();
ReplaceSubstringsAfterOffset(&contents, 0, "%e", err);
- if (error_description)
- *error_description = error.localizedDescription;
}
ReplaceSubstringsAfterOffset(&contents, 0, "%s",
error_url.possibly_invalid_spec());
*error_html = contents;
}
+ if (error_description) {
+ if (error.localizedDescription.isEmpty())
+ *error_description = ASCIIToUTF16(net::ErrorToString(error.reason));
+ else
+ *error_description = error.localizedDescription;
joth 2013/06/05 16:10:37 nit: need to use { } when there's an else. Maybe
+ }
}
unsigned long long AwContentRendererClient::VisitedLinkHash(
« no previous file with comments | « android_webview/javatests/src/org/chromium/android_webview/test/ClientOnReceivedErrorTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698