Commit b365ef9a authored by Austin Tankiang's avatar Austin Tankiang Committed by Commit Bot

Rename num_total_jobs to numTotalJobs to conform to style

Bug: None
Change-Id: If7ec7f8f9bbc7d5cb10bbe02eece69eb57d7be74
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2497782
Commit-Queue: Austin Tankiang <austinct@chromium.org>
Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821625}
parent b5981c12
......@@ -524,7 +524,7 @@ dictionary FileTransferStatus {
double total;
// Total number of jobs.
long num_total_jobs;
long numTotalJobs;
// If true, hide when a job is completed when there are zero jobs in
// progress. Otherwise, hide when one job is in progress.
......
......@@ -387,7 +387,7 @@ chrome.fileManagerPrivate.MountCompletedEvent;
* transferState: !chrome.fileManagerPrivate.TransferState,
* processed: number,
* total: number,
* num_total_jobs: number,
* numTotalJobs: number,
* hideWhenZeroJobs: boolean
* }}
*/
......
......@@ -203,8 +203,8 @@ class DriveSyncHandlerImpl extends cr.EventTarget {
break;
case 'completed':
case 'failed':
if ((status.hideWhenZeroJobs && status.num_total_jobs === 0) ||
(!status.hideWhenZeroJobs && status.num_total_jobs === 1)) {
if ((status.hideWhenZeroJobs && status.numTotalJobs === 0) ||
(!status.hideWhenZeroJobs && status.numTotalJobs === 1)) {
await this.removeItem_(item, status);
}
break;
......@@ -232,9 +232,9 @@ class DriveSyncHandlerImpl extends cr.EventTarget {
item.type = ProgressItemType.SYNC;
item.quiet = true;
this.syncing_ = true;
if (status.num_total_jobs > 1) {
if (status.numTotalJobs > 1) {
item.message =
strf(this.statusMessages_[item.id].plural, status.num_total_jobs);
strf(this.statusMessages_[item.id].plural, status.numTotalJobs);
} else {
item.message = strf(this.statusMessages_[item.id].single, entry.name);
}
......
......@@ -198,7 +198,7 @@ async function testOffline() {
transferState: 'in_progress',
processed: 50.0,
total: 100.0,
num_total_jobs: 1,
numTotalJobs: 1,
hideWhenZeroJobs: true,
});
......@@ -229,7 +229,7 @@ async function testTransferUpdate() {
transferState: 'in_progress',
processed: 50.0,
total: 100.0,
num_total_jobs: 1,
numTotalJobs: 1,
hideWhenZeroJobs: true,
});
......@@ -246,7 +246,7 @@ async function testTransferUpdate() {
transferState: 'in_progress',
processed: 25.0,
total: 100.0,
num_total_jobs: 1,
numTotalJobs: 1,
hideWhenZeroJobs: true,
});
......@@ -261,7 +261,7 @@ async function testTransferUpdate() {
transferState: 'completed',
processed: 100.0,
total: 100.0,
num_total_jobs: 0,
numTotalJobs: 0,
hideWhenZeroJobs: true,
});
......@@ -278,7 +278,7 @@ async function testTransferUpdate() {
transferState: 'failed',
processed: 40.0,
total: 100.0,
num_total_jobs: 0,
numTotalJobs: 0,
hideWhenZeroJobs: true,
});
......
......@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/* eslint-disable no-var */
/**
* Slide mode displays a single image and has a set of controls to navigate
* between the images and to edit an image.
......@@ -1095,7 +1097,7 @@ class SlideMode extends cr.EventTarget {
ImageUtil.getMetricName('FileType'), ext, ImageUtil.FILE_TYPES);
// Enable or disable buttons for editing and printing.
let canEditAndPrint = !opt_error && item.isEditable();
const canEditAndPrint = !opt_error && item.isEditable();
this.editButton_.disabled = !canEditAndPrint;
this.printButton_.disabled = !canEditAndPrint;
......@@ -1775,8 +1777,7 @@ class SlideMode extends cr.EventTarget {
* @private
*/
updateProgressBar_(status) {
if (status.fileUrl !== this.loadingItemUrl_ ||
status.num_total_jobs !== 1) {
if (status.fileUrl !== this.loadingItemUrl_ || status.numTotalJobs !== 1) {
// If user starts to download another image (or file), we cannot show
// determinate progress bar anymore since total and processed are for all
// current downloads.
......
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