Commit 012b86b7 authored by estade@chromium.org's avatar estade@chromium.org

use load_time_data for about:crashes

BUG=122753
TEST=manual


Review URL: https://chromiumcodereview.appspot.com/10387120

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137553 0039d316-1c4b-4281-b951-d872f2087c98
parent b882891c
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<title i18n-content="crashesTitle"></title> <title i18n-content="crashesTitle"></title>
<link rel="stylesheet" href="crashes.css"> <link rel="stylesheet" href="crashes.css">
<script src="chrome://resources/js/local_strings.js"></script> <script src="chrome://resources/js/load_time_data.js"></script>
<script src="chrome://resources/js/util.js"></script> <script src="chrome://resources/js/util.js"></script>
<script src="chrome://crashes/strings.js"></script> <script src="chrome://crashes/strings.js"></script>
<script src="chrome://crashes/crashes.js"></script> <script src="chrome://crashes/crashes.js"></script>
...@@ -20,8 +20,7 @@ ...@@ -20,8 +20,7 @@
<h2 i18n-content="disabledHeader"></h2> <h2 i18n-content="disabledHeader"></h2>
<p i18n-values=".innerHTML:disabledMessage"></p> <p i18n-values=".innerHTML:disabledMessage"></p>
</div> </div>
<script src="chrome://resources/js/i18n_template.js"></script> <script src="chrome://resources/js/i18n_template2.js"></script>
<script src="chrome://resources/js/i18n_process.js"></script>
<script src="chrome://resources/js/jstemplate_compiled.js"></script> <script src="chrome://resources/js/jstemplate_compiled.js"></script>
</body> </body>
</html> </html>
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
localStrings = new LocalStrings();
/** /**
* Requests the list of crashes from the backend. * Requests the list of crashes from the backend.
*/ */
...@@ -18,7 +16,7 @@ function requestCrashes() { ...@@ -18,7 +16,7 @@ function requestCrashes() {
* @param {string} version The browser version. * @param {string} version The browser version.
*/ */
function updateCrashList(enabled, crashes, version) { function updateCrashList(enabled, crashes, version) {
$('countBanner').textContent = localStrings.getStringF('crashCountFormat', $('countBanner').textContent = loadTimeData.getStringF('crashCountFormat',
crashes.length); crashes.length);
var crashSection = $('crashList'); var crashSection = $('crashList');
...@@ -37,11 +35,11 @@ function updateCrashList(enabled, crashes, version) { ...@@ -37,11 +35,11 @@ function updateCrashList(enabled, crashes, version) {
var crashBlock = document.createElement('div'); var crashBlock = document.createElement('div');
var title = document.createElement('h3'); var title = document.createElement('h3');
title.textContent = localStrings.getStringF('crashHeaderFormat', title.textContent = loadTimeData.getStringF('crashHeaderFormat',
crash['id']); crash['id']);
crashBlock.appendChild(title); crashBlock.appendChild(title);
var date = document.createElement('p'); var date = document.createElement('p');
date.textContent = localStrings.getStringF('crashTimeFormat', date.textContent = loadTimeData.getStringF('crashTimeFormat',
crash['time']); crash['time']);
crashBlock.appendChild(date); crashBlock.appendChild(date);
var linkBlock = document.createElement('p'); var linkBlock = document.createElement('p');
...@@ -76,7 +74,7 @@ function updateCrashList(enabled, crashes, version) { ...@@ -76,7 +74,7 @@ function updateCrashList(enabled, crashes, version) {
} }
link.href = href; link.href = href;
link.target = '_blank'; link.target = '_blank';
link.textContent = localStrings.getString('bugLinkText'); link.textContent = loadTimeData.getString('bugLinkText');
linkBlock.appendChild(link); linkBlock.appendChild(link);
crashBlock.appendChild(linkBlock); crashBlock.appendChild(linkBlock);
crashSection.appendChild(crashBlock); crashSection.appendChild(crashBlock);
......
...@@ -44,6 +44,7 @@ namespace { ...@@ -44,6 +44,7 @@ namespace {
ChromeWebUIDataSource* CreateCrashesUIHTMLSource() { ChromeWebUIDataSource* CreateCrashesUIHTMLSource() {
ChromeWebUIDataSource* source = ChromeWebUIDataSource* source =
new ChromeWebUIDataSource(chrome::kChromeUICrashesHost); new ChromeWebUIDataSource(chrome::kChromeUICrashesHost);
source->set_use_json_js_format_v2();
source->AddLocalizedString("crashesTitle", IDS_CRASHES_TITLE); source->AddLocalizedString("crashesTitle", IDS_CRASHES_TITLE);
source->AddLocalizedString("crashCountFormat", source->AddLocalizedString("crashCountFormat",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment