Index: chrome/browser/guest_view/web_view/web_view_guest.cc |
diff --git a/chrome/browser/guest_view/web_view/web_view_guest.cc b/chrome/browser/guest_view/web_view/web_view_guest.cc |
index 88ff3ddf68abd3f61e9924c69d4e2d4694192a88..650befff9901f75fb95ddd1df6924b99d6df8944 100644 |
--- a/chrome/browser/guest_view/web_view/web_view_guest.cc |
+++ b/chrome/browser/guest_view/web_view/web_view_guest.cc |
@@ -739,11 +739,8 @@ void WebViewGuest::DidFailProvisionalLoad( |
const GURL& validated_url, |
int error_code, |
const base::string16& error_description) { |
- // Translate the |error_code| into an error string. |
- std::string error_type(net::ErrorToString(error_code)); |
- DCHECK(StartsWithASCII(error_type, "net::", true)); |
- error_type.erase(0, 5); |
- LoadAbort(!render_frame_host->GetParent(), validated_url, error_type); |
+ LoadAbort(!render_frame_host->GetParent(), validated_url, |
+ net::ErrorToShortString(error_code)); |
} |
void WebViewGuest::DidStartProvisionalLoadForFrame( |
@@ -963,10 +960,8 @@ void WebViewGuest::NavigateGuest(const std::string& src) { |
!url.SchemeIs(url::kAboutScheme)) || |
url.SchemeIs(url::kJavaScriptScheme); |
if (scheme_is_blocked || !url.is_valid()) { |
- std::string error_type(net::ErrorToString(net::ERR_ABORTED)); |
- DCHECK(StartsWithASCII(error_type, "net::", true)); |
- error_type.erase(0, 5); |
- LoadAbort(true /* is_top_level */, url, error_type); |
+ LoadAbort(true /* is_top_level */, url, |
+ net::ErrorToShortString(net::ERR_ABORTED)); |
return; |
} |