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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/localized_error.h" 5 #include "chrome/common/localized_error.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 522
523 string16 failed_url_string(UTF8ToUTF16(failed_url.spec())); 523 string16 failed_url_string(UTF8ToUTF16(failed_url.spec()));
524 // URLs are always LTR. 524 // URLs are always LTR.
525 if (rtl) 525 if (rtl)
526 base::i18n::WrapStringWithLTRFormatting(&failed_url_string); 526 base::i18n::WrapStringWithLTRFormatting(&failed_url_string);
527 error_strings->SetString("title", 527 error_strings->SetString("title",
528 l10n_util::GetStringFUTF16(options.title_resource_id, failed_url_string)); 528 l10n_util::GetStringFUTF16(options.title_resource_id, failed_url_string));
529 error_strings->SetString("heading", 529 error_strings->SetString("heading",
530 l10n_util::GetStringUTF16(options.heading_resource_id)); 530 l10n_util::GetStringUTF16(options.heading_resource_id));
531 531
532 error_strings->SetBoolean("isOffline",
533 error_code == net::ERR_INTERNET_DISCONNECTED);
mmenke 2013/07/24 14:54:17 Rather than using a bool, suggest a string, since
newt (away) 2013/07/24 17:30:52 Shouldn't error_code == net::ERR_INTERNET_DISCONNE
mmenke 2013/07/24 17:51:04 In practice, that's currently the case. However,
534
532 base::DictionaryValue* summary = new base::DictionaryValue; 535 base::DictionaryValue* summary = new base::DictionaryValue;
533 summary->SetString("msg", 536 summary->SetString("msg",
534 l10n_util::GetStringUTF16(options.summary_resource_id)); 537 l10n_util::GetStringUTF16(options.summary_resource_id));
535 // TODO(tc): We want the unicode url and host here since they're being 538 // TODO(tc): We want the unicode url and host here since they're being
536 // displayed. 539 // displayed.
537 summary->SetString("failedUrl", failed_url_string); 540 summary->SetString("failedUrl", failed_url_string);
538 summary->SetString("hostName", failed_url.host()); 541 summary->SetString("hostName", failed_url.host());
539 summary->SetString("productName", 542 summary->SetString("productName",
540 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 543 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
541 544
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 #if defined(OS_CHROMEOS) 804 #if defined(OS_CHROMEOS)
802 GURL learn_more_url(kAppWarningLearnMoreUrl); 805 GURL learn_more_url(kAppWarningLearnMoreUrl);
803 base::DictionaryValue* suggest_learn_more = new base::DictionaryValue(); 806 base::DictionaryValue* suggest_learn_more = new base::DictionaryValue();
804 suggest_learn_more->SetString("msg", 807 suggest_learn_more->SetString("msg",
805 l10n_util::GetStringUTF16( 808 l10n_util::GetStringUTF16(
806 IDS_ERRORPAGES_SUGGESTION_LEARNMORE_BODY)); 809 IDS_ERRORPAGES_SUGGESTION_LEARNMORE_BODY));
807 suggest_learn_more->SetString("learnMoreUrl", learn_more_url.spec()); 810 suggest_learn_more->SetString("learnMoreUrl", learn_more_url.spec());
808 error_strings->Set("suggestionsLearnMore", suggest_learn_more); 811 error_strings->Set("suggestionsLearnMore", suggest_learn_more);
809 #endif // defined(OS_CHROMEOS) 812 #endif // defined(OS_CHROMEOS)
810 } 813 }
OLDNEW
« 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