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

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: 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 unified diff | Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/renderer/resources/neterror.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 summary->SetString("failedUrl", failed_url_string); 543 summary->SetString("failedUrl", failed_url_string);
544 summary->SetString("hostName", failed_url.host()); 544 summary->SetString("hostName", failed_url.host());
545 summary->SetString("productName", 545 summary->SetString("productName",
546 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 546 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
547 547
548 error_strings->SetString( 548 error_strings->SetString(
549 "more", l10n_util::GetStringUTF16(IDS_ERRORPAGES_BUTTON_MORE)); 549 "more", l10n_util::GetStringUTF16(IDS_ERRORPAGES_BUTTON_MORE));
550 error_strings->SetString( 550 error_strings->SetString(
551 "less", l10n_util::GetStringUTF16(IDS_ERRORPAGES_BUTTON_LESS)); 551 "less", l10n_util::GetStringUTF16(IDS_ERRORPAGES_BUTTON_LESS));
552 error_strings->Set("summary", summary); 552 error_strings->Set("summary", summary);
553 #if defined(OS_CHROMEOS)
554 error_strings->SetString(
555 "diagnose", l10n_util::GetStringUTF16(IDS_ERRORPAGES_BUTTON_DIAGNOSE));
556 #endif // defined(OS_CHROMEOS)
553 557
554 if (options.details_resource_id != kErrorPagesNoDetails) { 558 if (options.details_resource_id != kErrorPagesNoDetails) {
555 error_strings->SetString( 559 error_strings->SetString(
556 "errorDetails", l10n_util::GetStringUTF16(options.details_resource_id)); 560 "errorDetails", l10n_util::GetStringUTF16(options.details_resource_id));
557 } 561 }
558 562
559 string16 error_string; 563 string16 error_string;
560 if (error_domain == net::kErrorDomain) { 564 if (error_domain == net::kErrorDomain) {
561 // Non-internationalized error string, for debugging Chrome itself. 565 // Non-internationalized error string, for debugging Chrome itself.
562 std::string ascii_error_string = net::ErrorToString(error_code); 566 std::string ascii_error_string = net::ErrorToString(error_code);
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 #if defined(OS_CHROMEOS) 811 #if defined(OS_CHROMEOS)
808 GURL learn_more_url(kAppWarningLearnMoreUrl); 812 GURL learn_more_url(kAppWarningLearnMoreUrl);
809 base::DictionaryValue* suggest_learn_more = new base::DictionaryValue(); 813 base::DictionaryValue* suggest_learn_more = new base::DictionaryValue();
810 suggest_learn_more->SetString("msg", 814 suggest_learn_more->SetString("msg",
811 l10n_util::GetStringUTF16( 815 l10n_util::GetStringUTF16(
812 IDS_ERRORPAGES_SUGGESTION_LEARNMORE_BODY)); 816 IDS_ERRORPAGES_SUGGESTION_LEARNMORE_BODY));
813 suggest_learn_more->SetString("learnMoreUrl", learn_more_url.spec()); 817 suggest_learn_more->SetString("learnMoreUrl", learn_more_url.spec());
814 error_strings->Set("suggestionsLearnMore", suggest_learn_more); 818 error_strings->Set("suggestionsLearnMore", suggest_learn_more);
815 #endif // defined(OS_CHROMEOS) 819 #endif // defined(OS_CHROMEOS)
816 } 820 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/renderer/resources/neterror.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698