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

Unified Diff: chrome/browser/resources/about_stats.js

Issue 12560002: Change var blah_blah -> blahBlah. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/about_stats.js
diff --git a/chrome/browser/resources/about_stats.js b/chrome/browser/resources/about_stats.js
index 512fba0047aac0c17a0631103db59c8d18354eea..380d65ec8a378c61dc2248c3f8dda8624612931f 100644
--- a/chrome/browser/resources/about_stats.js
+++ b/chrome/browser/resources/about_stats.js
@@ -85,9 +85,9 @@ function removeNullValues() {
}
var nodes = document.getElementsByName('timer');
for (var i = 0, node; node = nodes[i]; i++) {
- var value_node = getTimerValueFromTimerNode(node);
- if (value_node.innerHTML == 'null')
- value_node.innerHTML = '';
+ var valueNode = getTimerValueFromTimerNode(node);
+ if (valueNode.innerHTML == 'null')
+ valueNode.innerHTML = '';
}
}
@@ -114,11 +114,11 @@ function onLoadWork() {
// Add handlers to dynamically created HTML elements.
var elements = document.getElementsByName('string-sort');
for (var i = 0; i < elements.length; ++i)
- elements[i].onclick = function() { sort_table('string'); };
+ elements[i].onclick = function() { sortTable('string'); };
elements = document.getElementsByName('number-sort');
for (i = 0; i < elements.length; ++i)
- elements[i].onclick = function() { sort_table('number'); };
+ elements[i].onclick = function() { sortTable('number'); };
doColor();
removeNullValues();
@@ -136,12 +136,12 @@ function onLoadWork() {
// The function sorts rows after the row with onclick event handler.
//
// type: the data type, 'string', 'number'
-function sort_table(type) {
+function sortTable(type) {
var cell = event.target;
var cnum = cell.cellIndex;
var row = cell.parentNode;
- var start_index = row.rowIndex + 1;
+ var startIndex = row.rowIndex + 1;
var tbody = row.parentNode;
var table = tbody.parentNode;
@@ -150,40 +150,40 @@ function sort_table(type) {
var indexes = new Array();
// skip the first row
- for (var i = start_index; i < table.rows.length; i++)
+ for (var i = startIndex; i < table.rows.length; i++)
rows.push(table.rows[i]);
// a, b are strings
- function compare_strings(a, b) {
+ function compareStrings(a, b) {
if (a == b) return 0;
if (a < b) return -1;
return 1;
}
// a, b are numbers
- function compare_numbers(a, b) {
+ function compareNumbers(a, b) {
var x = isNaN(a) ? 0 : a;
var y = isNaN(b) ? 0 : b;
return x - y;
}
- var sort_func;
+ var sortFunc;
if (type === 'string') {
- sort_func = function(a, b) {
+ sortFunc = function(a, b) {
var x = a.cells[cnum].innerText;
var y = b.cells[cnum].innerText;
- return compare_strings(x, y);
+ return compareStrings(x, y);
};
} else if (type === 'number') {
- sort_func = function(a, b) {
+ sortFunc = function(a, b) {
var x = parseFloat(a.cells[cnum].innerText);
var y = parseFloat(b.cells[cnum].innerText);
- return compare_numbers(x, y);
+ return compareNumbers(x, y);
};
}
- rows.sort(sort_func);
+ rows.sort(sortFunc);
// change tables
if (cell._reverse) {
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/resources/backloader/scripts/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698