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

Unified Diff: chrome/common/localized_error.cc

Issue 19477006: Use dinosaur icon on "you are offline" error page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 5 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 136607a7de7a27b85b1258ff75fb89e8ef225827..3939e6f075eb6e83f89c7a28a7a737342425a229 100644
--- a/chrome/common/localized_error.cc
+++ b/chrome/common/localized_error.cc
@@ -529,6 +529,12 @@ void LocalizedError::GetStrings(const WebKit::WebURLError& error,
error_strings->SetString("heading",
l10n_util::GetStringUTF16(options.heading_resource_id));
+ std::string icon_class = (error_code == net::ERR_INTERNET_DISCONNECTED &&
+ error_domain == net::kErrorDomain)
+ ? "icon-offline"
+ : "icon-generic";
+ error_strings->SetString("iconClass", icon_class);
+
base::DictionaryValue* summary = new base::DictionaryValue;
summary->SetString("msg",
l10n_util::GetStringUTF16(options.summary_resource_id));
« no previous file with comments | « chrome/browser/resources/chromeos/login/screen_error_message.html ('k') | chrome/renderer/resources/neterror.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698