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 { ...@@ -524,7 +524,7 @@ dictionary FileTransferStatus {
double total; double total;
// Total number of jobs. // Total number of jobs.
long num_total_jobs; long numTotalJobs;
// If true, hide when a job is completed when there are zero jobs in // If true, hide when a job is completed when there are zero jobs in
// progress. Otherwise, hide when one job is in progress. // progress. Otherwise, hide when one job is in progress.
......
...@@ -387,7 +387,7 @@ chrome.fileManagerPrivate.MountCompletedEvent; ...@@ -387,7 +387,7 @@ chrome.fileManagerPrivate.MountCompletedEvent;
* transferState: !chrome.fileManagerPrivate.TransferState, * transferState: !chrome.fileManagerPrivate.TransferState,
* processed: number, * processed: number,
* total: number, * total: number,
* num_total_jobs: number, * numTotalJobs: number,
* hideWhenZeroJobs: boolean * hideWhenZeroJobs: boolean
* }} * }}
*/ */
......
...@@ -203,8 +203,8 @@ class DriveSyncHandlerImpl extends cr.EventTarget { ...@@ -203,8 +203,8 @@ class DriveSyncHandlerImpl extends cr.EventTarget {
break; break;
case 'completed': case 'completed':
case 'failed': case 'failed':
if ((status.hideWhenZeroJobs && status.num_total_jobs === 0) || if ((status.hideWhenZeroJobs && status.numTotalJobs === 0) ||
(!status.hideWhenZeroJobs && status.num_total_jobs === 1)) { (!status.hideWhenZeroJobs && status.numTotalJobs === 1)) {
await this.removeItem_(item, status); await this.removeItem_(item, status);
} }
break; break;
...@@ -232,9 +232,9 @@ class DriveSyncHandlerImpl extends cr.EventTarget { ...@@ -232,9 +232,9 @@ class DriveSyncHandlerImpl extends cr.EventTarget {
item.type = ProgressItemType.SYNC; item.type = ProgressItemType.SYNC;
item.quiet = true; item.quiet = true;
this.syncing_ = true; this.syncing_ = true;
if (status.num_total_jobs > 1) { if (status.numTotalJobs > 1) {
item.message = item.message =
strf(this.statusMessages_[item.id].plural, status.num_total_jobs); strf(this.statusMessages_[item.id].plural, status.numTotalJobs);
} else { } else {
item.message = strf(this.statusMessages_[item.id].single, entry.name); item.message = strf(this.statusMessages_[item.id].single, entry.name);
} }
......
...@@ -198,7 +198,7 @@ async function testOffline() { ...@@ -198,7 +198,7 @@ async function testOffline() {
transferState: 'in_progress', transferState: 'in_progress',
processed: 50.0, processed: 50.0,
total: 100.0, total: 100.0,
num_total_jobs: 1, numTotalJobs: 1,
hideWhenZeroJobs: true, hideWhenZeroJobs: true,
}); });
...@@ -229,7 +229,7 @@ async function testTransferUpdate() { ...@@ -229,7 +229,7 @@ async function testTransferUpdate() {
transferState: 'in_progress', transferState: 'in_progress',
processed: 50.0, processed: 50.0,
total: 100.0, total: 100.0,
num_total_jobs: 1, numTotalJobs: 1,
hideWhenZeroJobs: true, hideWhenZeroJobs: true,
}); });
...@@ -246,7 +246,7 @@ async function testTransferUpdate() { ...@@ -246,7 +246,7 @@ async function testTransferUpdate() {
transferState: 'in_progress', transferState: 'in_progress',
processed: 25.0, processed: 25.0,
total: 100.0, total: 100.0,
num_total_jobs: 1, numTotalJobs: 1,
hideWhenZeroJobs: true, hideWhenZeroJobs: true,
}); });
...@@ -261,7 +261,7 @@ async function testTransferUpdate() { ...@@ -261,7 +261,7 @@ async function testTransferUpdate() {
transferState: 'completed', transferState: 'completed',
processed: 100.0, processed: 100.0,
total: 100.0, total: 100.0,
num_total_jobs: 0, numTotalJobs: 0,
hideWhenZeroJobs: true, hideWhenZeroJobs: true,
}); });
...@@ -278,7 +278,7 @@ async function testTransferUpdate() { ...@@ -278,7 +278,7 @@ async function testTransferUpdate() {
transferState: 'failed', transferState: 'failed',
processed: 40.0, processed: 40.0,
total: 100.0, total: 100.0,
num_total_jobs: 0, numTotalJobs: 0,
hideWhenZeroJobs: true, hideWhenZeroJobs: true,
}); });
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
// 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.
/* eslint-disable no-var */
/** /**
* Slide mode displays a single image and has a set of controls to navigate * Slide mode displays a single image and has a set of controls to navigate
* between the images and to edit an image. * between the images and to edit an image.
...@@ -1095,7 +1097,7 @@ class SlideMode extends cr.EventTarget { ...@@ -1095,7 +1097,7 @@ class SlideMode extends cr.EventTarget {
ImageUtil.getMetricName('FileType'), ext, ImageUtil.FILE_TYPES); ImageUtil.getMetricName('FileType'), ext, ImageUtil.FILE_TYPES);
// Enable or disable buttons for editing and printing. // 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.editButton_.disabled = !canEditAndPrint;
this.printButton_.disabled = !canEditAndPrint; this.printButton_.disabled = !canEditAndPrint;
...@@ -1775,8 +1777,7 @@ class SlideMode extends cr.EventTarget { ...@@ -1775,8 +1777,7 @@ class SlideMode extends cr.EventTarget {
* @private * @private
*/ */
updateProgressBar_(status) { updateProgressBar_(status) {
if (status.fileUrl !== this.loadingItemUrl_ || if (status.fileUrl !== this.loadingItemUrl_ || status.numTotalJobs !== 1) {
status.num_total_jobs !== 1) {
// If user starts to download another image (or file), we cannot show // If user starts to download another image (or file), we cannot show
// determinate progress bar anymore since total and processed are for all // determinate progress bar anymore since total and processed are for all
// current downloads. // 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