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

Side by Side Diff: chrome/common/localized_error.cc

Issue 20604002: Add Diagnose Errors button to navigation error page (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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 unified diff | Download patch
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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 summary->SetString("failedUrl", failed_url_string); 537 summary->SetString("failedUrl", failed_url_string);
538 summary->SetString("hostName", failed_url.host()); 538 summary->SetString("hostName", failed_url.host());
539 summary->SetString("productName", 539 summary->SetString("productName",
540 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 540 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
541 541
542 error_strings->SetString( 542 error_strings->SetString(
543 "more", l10n_util::GetStringUTF16(IDS_ERRORPAGES_BUTTON_MORE)); 543 "more", l10n_util::GetStringUTF16(IDS_ERRORPAGES_BUTTON_MORE));
544 error_strings->SetString( 544 error_strings->SetString(
545 "less", l10n_util::GetStringUTF16(IDS_ERRORPAGES_BUTTON_LESS)); 545 "less", l10n_util::GetStringUTF16(IDS_ERRORPAGES_BUTTON_LESS));
546 error_strings->Set("summary", summary); 546 error_strings->Set("summary", summary);
547 error_strings->SetString(
548 "diagnose", l10n_util::GetStringUTF16(IDS_ERRORPAGES_BUTTON_DIAGNOSE));
547 549
548 if (options.details_resource_id != kErrorPagesNoDetails) { 550 if (options.details_resource_id != kErrorPagesNoDetails) {
549 error_strings->SetString( 551 error_strings->SetString(
550 "errorDetails", l10n_util::GetStringUTF16(options.details_resource_id)); 552 "errorDetails", l10n_util::GetStringUTF16(options.details_resource_id));
551 } 553 }
552 554
553 string16 error_string; 555 string16 error_string;
554 if (error_domain == net::kErrorDomain) { 556 if (error_domain == net::kErrorDomain) {
555 // Non-internationalized error string, for debugging Chrome itself. 557 // Non-internationalized error string, for debugging Chrome itself.
556 std::string ascii_error_string = net::ErrorToString(error_code); 558 std::string ascii_error_string = net::ErrorToString(error_code);
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 #if defined(OS_CHROMEOS) 803 #if defined(OS_CHROMEOS)
802 GURL learn_more_url(kAppWarningLearnMoreUrl); 804 GURL learn_more_url(kAppWarningLearnMoreUrl);
803 base::DictionaryValue* suggest_learn_more = new base::DictionaryValue(); 805 base::DictionaryValue* suggest_learn_more = new base::DictionaryValue();
804 suggest_learn_more->SetString("msg", 806 suggest_learn_more->SetString("msg",
805 l10n_util::GetStringUTF16( 807 l10n_util::GetStringUTF16(
806 IDS_ERRORPAGES_SUGGESTION_LEARNMORE_BODY)); 808 IDS_ERRORPAGES_SUGGESTION_LEARNMORE_BODY));
807 suggest_learn_more->SetString("learnMoreUrl", learn_more_url.spec()); 809 suggest_learn_more->SetString("learnMoreUrl", learn_more_url.spec());
808 error_strings->Set("suggestionsLearnMore", suggest_learn_more); 810 error_strings->Set("suggestionsLearnMore", suggest_learn_more);
809 #endif // defined(OS_CHROMEOS) 811 #endif // defined(OS_CHROMEOS)
810 } 812 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698