Commit c4ca3350 authored by dpapad's avatar dpapad Committed by Commit Bot

FileManager: Fix type checking violations found with Closure v20190929.

 - Fix newly found JSC_HIDDEN_INTERFACE_PROPERTY_MISMATCH, as a result of
   the interface checking overhaul at [1]
 - Fix/suppress newly found JSC_CONSTANT_PROPERTY_REASSIGNED_VALUE errors.

This is in preparation of rolling a newer compiler version at a later CL.

[1] https://github.com/google/closure-compiler/commit/86acbd5e3ec78f08a1804df5f1efbea129d29c0e

Bug: 1012840
Change-Id: I8c356c9d2d3df03120f04614eafa555de488c8fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1850312
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Auto-Submit: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704889}
parent 4dac4603
...@@ -22,7 +22,7 @@ class MockCommandLinePrivate { ...@@ -22,7 +22,7 @@ class MockCommandLinePrivate {
} }
if (!chrome.commandLinePrivate) { if (!chrome.commandLinePrivate) {
/** @suppress {checkTypes} */ /** @suppress {checkTypes, const} */
chrome.commandLinePrivate = {}; chrome.commandLinePrivate = {};
} }
chrome.commandLinePrivate.hasSwitch = (name, callback) => { chrome.commandLinePrivate.hasSwitch = (name, callback) => {
...@@ -53,7 +53,7 @@ class MockChromeStorageAPI { ...@@ -53,7 +53,7 @@ class MockChromeStorageAPI {
window.chrome = window.chrome || {}; window.chrome = window.chrome || {};
/** @suppress {const} */ /** @suppress {const} */
window.chrome.runtime = window.chrome.runtime || {}; // For lastError. window.chrome.runtime = window.chrome.runtime || {}; // For lastError.
/** @suppress {checkTypes} */ /** @suppress {checkTypes, const} */
window.chrome.storage = { window.chrome.storage = {
local: { local: {
get: this.get_.bind(this), get: this.get_.bind(this),
......
...@@ -78,7 +78,10 @@ importer.ImportHistory = class { ...@@ -78,7 +78,10 @@ importer.ImportHistory = class {
/** /**
* @enum {string} Import history changed event |state| values. * @enum {string} Import history changed event |state| values.
*/ */
importer.ImportHistoryState = {}; importer.ImportHistoryState = {
'COPIED': 'copied',
'IMPORTED': 'imported'
};
/** /**
* Import history changed event (sent to ImportHistory.Observer's). * Import history changed event (sent to ImportHistory.Observer's).
......
...@@ -11,7 +11,7 @@ class EntryLocation { ...@@ -11,7 +11,7 @@ class EntryLocation {
constructor() { constructor() {
/** /**
* Volume information. * Volume information.
* @type {!VolumeInfo} * @type {VolumeInfo}
*/ */
this.volumeInfo; this.volumeInfo;
......
...@@ -25,7 +25,7 @@ class VolumeManager { ...@@ -25,7 +25,7 @@ class VolumeManager {
* Obtains a volume info containing the passed entry. * Obtains a volume info containing the passed entry.
* @param {!Entry|!FilesAppEntry} entry Entry on the volume to be * @param {!Entry|!FilesAppEntry} entry Entry on the volume to be
* returned. Can be fake. * returned. Can be fake.
* @return {VolumeInfo} The VolumeInfo instance or null if not found. * @return {?VolumeInfo} The VolumeInfo instance or null if not found.
*/ */
getVolumeInfo(entry) {} getVolumeInfo(entry) {}
......
...@@ -19,9 +19,9 @@ class FileManager extends cr.EventTarget { ...@@ -19,9 +19,9 @@ class FileManager extends cr.EventTarget {
/** /**
* Volume manager. * Volume manager.
* @private {?FilteredVolumeManager} * @private {!FilteredVolumeManager}
*/ */
this.volumeManager_ = null; this.volumeManager_;
/** @private {?importer.HistoryLoader} */ /** @private {?importer.HistoryLoader} */
this.historyLoader_ = null; this.historyLoader_ = null;
...@@ -438,7 +438,7 @@ class FileManager extends cr.EventTarget { ...@@ -438,7 +438,7 @@ class FileManager extends cr.EventTarget {
} }
/** /**
* @return {FilteredVolumeManager} * @return {!FilteredVolumeManager}
*/ */
get volumeManager() { get volumeManager() {
return this.volumeManager_; return this.volumeManager_;
......
...@@ -47,18 +47,18 @@ MockThumbnailLoader.testImageDataUrl = null; ...@@ -47,18 +47,18 @@ MockThumbnailLoader.testImageDataUrl = null;
/** /**
* Width of test image. * Width of test image.
* @private {number} * @type {number}
*/ */
MockThumbnailLoader.testImageWidth = 0; MockThumbnailLoader.testImageWidth = 0;
/** /**
* Height of test image. * Height of test image.
* @private {number} * @type {number}
*/ */
MockThumbnailLoader.testImageHeight = 0; MockThumbnailLoader.testImageHeight = 0;
/** /**
* Error urls. * Error urls.
* @private {Array<string>} * @type {Array<string>}
*/ */
MockThumbnailLoader.errorUrls = []; MockThumbnailLoader.errorUrls = [];
...@@ -265,9 +265,9 @@ class FileManagerUI { ...@@ -265,9 +265,9 @@ class FileManagerUI {
/** /**
* List container. * List container.
* @type {ListContainer} * @type {!ListContainer}
*/ */
this.listContainer = null; this.listContainer;
/** /**
* @type {!HTMLElement} * @type {!HTMLElement}
......
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