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

Unified Diff: chrome/browser/errorpage_browsertest.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 | « no previous file | chrome/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/errorpage_browsertest.cc
diff --git a/chrome/browser/errorpage_browsertest.cc b/chrome/browser/errorpage_browsertest.cc
index 1d676a9731234f0124dc3fd8b197d6a35c376203..d9f759618dab8eacc763ce4220fda7a9b5454c79 100644
--- a/chrome/browser/errorpage_browsertest.cc
+++ b/chrome/browser/errorpage_browsertest.cc
@@ -87,13 +87,7 @@ void ToggleHelpBox(Browser* browser) {
// |error_code| on the current page.
bool WARN_UNUSED_RESULT IsDisplayingNetError(Browser* browser,
net::Error error_code) {
- // Get the error as a string, and remove the leading "net::", which is not
- // included on error pages.
- std::string error_string(net::ErrorToString(error_code));
- DCHECK(StartsWithASCII(error_string, "net::", true));
- error_string.erase(0, 5);
-
- return IsDisplayingText(browser, error_string);
+ return IsDisplayingText(browser, net::ErrorToShortString(error_code));
}
// Checks that the local error page is being displayed, without remotely
« no previous file with comments | « no previous file | chrome/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698