| Index: chrome/browser/errorpage_browsertest.cc
|
| diff --git a/chrome/browser/errorpage_browsertest.cc b/chrome/browser/errorpage_browsertest.cc
|
| index c23c7d04d8fa770c9fc1d2a2063e10a9e7158aca..025492f300e95059a351698a9980cdcda2789854 100644
|
| --- a/chrome/browser/errorpage_browsertest.cc
|
| +++ b/chrome/browser/errorpage_browsertest.cc
|
| @@ -89,8 +89,9 @@ 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);
|
| - base::RemoveChars(error_string, "net:", &error_string);
|
| + std::string error_string(net::ErrorToString(error_code));
|
| + DCHECK(StartsWithASCII(error_string, "net::", true));
|
| + error_string.erase(0, 5);
|
|
|
| return IsDisplayingText(browser, error_string);
|
| }
|
|
|