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

Unified Diff: chrome/renderer/localized_error.cc

Issue 8142032: Add error description to the DidFailProvisionalLoad callback. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: update commit message with BUG and TEST fields Created 9 years, 2 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/renderer/localized_error.h ('k') | content/browser/tab_contents/navigation_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/localized_error.cc
diff --git a/chrome/renderer/localized_error.cc b/chrome/renderer/localized_error.cc
index 681d783b6cf7ec1af79815b693b3f0e92ca9acc8..ad14e962fab998b054e877c8d61b390cd6ec10c3 100644
--- a/chrome/renderer/localized_error.cc
+++ b/chrome/renderer/localized_error.cc
@@ -630,6 +630,15 @@ void LocalizedError::GetStrings(const WebKit::WebURLError& error,
}
}
+string16 LocalizedError::GetErrorDetails(const WebKit::WebURLError& error) {
+ const LocalizedErrorMap* error_map =
+ LookupErrorMap(error.domain.utf8(), error.reason);
+ if (error_map)
+ return l10n_util::GetStringUTF16(error_map->details_resource_id);
+ else
+ return l10n_util::GetStringUTF16(IDS_ERRORPAGES_DETAILS_UNKNOWN);
+}
+
bool LocalizedError::HasStrings(const std::string& error_domain,
int error_code) {
return LookupErrorMap(error_domain, error_code) != NULL;
« no previous file with comments | « chrome/renderer/localized_error.h ('k') | content/browser/tab_contents/navigation_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698