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

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

Issue 4464005: Update the error page template to be a little prettier. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Sync with trunk Created 10 years, 1 month 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
« 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/renderer/localized_error.h" 5 #include "chrome/renderer/localized_error.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 294
295 } // namespace 295 } // namespace
296 296
297 const char LocalizedError::kHttpErrorDomain[] = "http"; 297 const char LocalizedError::kHttpErrorDomain[] = "http";
298 298
299 void LocalizedError::GetStrings(const WebKit::WebURLError& error, 299 void LocalizedError::GetStrings(const WebKit::WebURLError& error,
300 DictionaryValue* error_strings) { 300 DictionaryValue* error_strings) {
301 bool rtl = LocaleIsRTL(); 301 bool rtl = LocaleIsRTL();
302 error_strings->SetString("textdirection", rtl ? "rtl" : "ltr"); 302 error_strings->SetString("textdirection", rtl ? "rtl" : "ltr");
303 303
304 // Grab strings that are applicable to all error pages
305 error_strings->SetString("detailsLink",
306 l10n_util::GetStringUTF16(IDS_ERRORPAGES_DETAILS_LINK));
307 error_strings->SetString("detailsHeading",
308 l10n_util::GetStringUTF16(IDS_ERRORPAGES_DETAILS_HEADING));
309
310 // Grab the strings and settings that depend on the error type. Init 304 // Grab the strings and settings that depend on the error type. Init
311 // options with default values. 305 // options with default values.
312 LocalizedErrorMap options = { 306 LocalizedErrorMap options = {
313 0, 307 0,
314 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, 308 IDS_ERRORPAGES_TITLE_NOT_AVAILABLE,
315 IDS_ERRORPAGES_HEADING_NOT_AVAILABLE, 309 IDS_ERRORPAGES_HEADING_NOT_AVAILABLE,
316 IDS_ERRORPAGES_SUMMARY_NOT_AVAILABLE, 310 IDS_ERRORPAGES_SUMMARY_NOT_AVAILABLE,
317 IDS_ERRORPAGES_DETAILS_UNKNOWN, 311 IDS_ERRORPAGES_DETAILS_UNKNOWN,
318 SUGGEST_NONE, 312 SUGGEST_NONE,
319 }; 313 };
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 error_strings->SetString( 492 error_strings->SetString(
499 "url", l10n_util::GetStringFUTF16(IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, 493 "url", l10n_util::GetStringFUTF16(IDS_ERRORPAGES_TITLE_NOT_AVAILABLE,
500 failed_url.c_str())); 494 failed_url.c_str()));
501 495
502 error_strings->SetString("title", app->name()); 496 error_strings->SetString("title", app->name());
503 error_strings->SetString("icon", app->icon_url().spec()); 497 error_strings->SetString("icon", app->icon_url().spec());
504 error_strings->SetString("name", app->name()); 498 error_strings->SetString("name", app->name());
505 error_strings->SetString("msg", 499 error_strings->SetString("msg",
506 l10n_util::GetStringUTF16(IDS_ERRORPAGES_APP_WARNING)); 500 l10n_util::GetStringUTF16(IDS_ERRORPAGES_APP_WARNING));
507 } 501 }
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