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: chrome/common/localized_error.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
Index: chrome/common/localized_error.cc
diff --git a/chrome/common/localized_error.cc b/chrome/common/localized_error.cc
index ecff88ff9ced20dd5db90d30fa2557c76ceee9f4..ccee5c753c0eef7caa8b0ca8ae2951fb7da76881 100644
--- a/chrome/common/localized_error.cc
+++ b/chrome/common/localized_error.cc
@@ -578,11 +578,7 @@ void LocalizedError::GetStrings(int error_code,
base::string16 error_string;
if (error_domain == net::kErrorDomain) {
// Non-internationalized error string, for debugging Chrome itself.
- std::string ascii_error_string = net::ErrorToString(error_code);
- // Remove the leading "net::" from the returned string.
- DCHECK(StartsWithASCII(ascii_error_string, "net::", true));
- ascii_error_string.erase(0, 5);
- error_string = base::ASCIIToUTF16(ascii_error_string);
+ error_string = base::ASCIIToUTF16(net::ErrorToShortString(error_code));
} else if (error_domain == chrome_common_net::kDnsProbeErrorDomain) {
std::string ascii_error_string =
chrome_common_net::DnsProbeStatusToString(error_code);
« no previous file with comments | « chrome/browser/resources/net_internals/source_entry.js ('k') | chrome/test/data/webui/net_internals/dns_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698