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

Unified Diff: android_webview/renderer/aw_content_renderer_client.cc

Issue 15979017: [Android WebView] Provide a minimal error description for nav errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « no previous file | 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 02b1c54507c041fe3b9e89dd4792c35ce589e3aa..adf8dd41e9b0828b52e07e018aeb1ef9f1e41317 100644
--- a/android_webview/renderer/aw_content_renderer_client.cc
+++ b/android_webview/renderer/aw_content_renderer_client.cc
@@ -13,6 +13,7 @@
#include "components/visitedlink/renderer/visitedlink_slave.h"
#include "content/public/renderer/render_thread.h"
#include "googleurl/src/gurl.h"
+#include "net/base/net_errors.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/platform/WebURLError.h"
@@ -68,9 +69,15 @@ void AwContentRendererClient::GetNavigationErrorStrings(
std::string contents;
if (err.empty()) {
contents = AwResource::GetNoDomainPageContent();
+ if (error_description) {
+ *error_description =
+ string16(ASCIIToUTF16(net::ErrorToString(error.reason)));
benm (inactive) 2013/06/04 10:24:50 is the string16 ctor needed?
mnaganov (inactive) 2013/06/04 10:43:04 Actually not, removed.
+ }
} else {
contents = AwResource::GetLoadErrorPageContent();
ReplaceSubstringsAfterOffset(&contents, 0, "%e", err);
+ if (error_description)
+ *error_description = error.localizedDescription;
}
ReplaceSubstringsAfterOffset(&contents, 0, "%s",
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698