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

Unified Diff: chrome/browser/guest_view/web_view/web_view_guest.cc

Issue 432553003: Remove redundant mapping of net errors to strings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to comments Created 6 years, 4 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 | « chrome/browser/errorpage_browsertest.cc ('k') | chrome/browser/resources/net_internals/main.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « chrome/browser/errorpage_browsertest.cc ('k') | chrome/browser/resources/net_internals/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698