diff options
author | yoshiki@chromium.org <yoshiki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-14 06:53:46 +0000 |
---|---|---|
committer | yoshiki@chromium.org <yoshiki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-14 06:53:46 +0000 |
commit | 8a69cf9e2b09c0938da65ef5721ef528d37208ff (patch) | |
tree | 0a482cb0f35abcac623e25ccd65d8004f8930445 | |
parent | 2d35cba3953311258ce877e95a639ef0f3ca3691 (diff) | |
download | chromium_src-8a69cf9e2b09c0938da65ef5721ef528d37208ff.zip chromium_src-8a69cf9e2b09c0938da65ef5721ef528d37208ff.tar.gz chromium_src-8a69cf9e2b09c0938da65ef5721ef528d37208ff.tar.bz2 |
[Cleanup] Files.app: Fill 'TODO' comments to missing descriptions in @param annotation.
This suppresses 'E:0210: Missing docs for parameter' errors from closure linter.
All changes are in comment, hence I believe this patch doesn't change any behavior.
BUG=175657
TEST=none
TBR=mtomasz@chromium.org
Review URL: https://codereview.chromium.org/12261008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182402 0039d316-1c4b-4281-b951-d872f2087c98
4 files changed, 73 insertions, 0 deletions
diff --git a/chrome/browser/resources/file_manager/js/metadata/byte_reader.js b/chrome/browser/resources/file_manager/js/metadata/byte_reader.js index bb81170..ff076ad 100644 --- a/chrome/browser/resources/file_manager/js/metadata/byte_reader.js +++ b/chrome/browser/resources/file_manager/js/metadata/byte_reader.js @@ -49,6 +49,10 @@ ByteReader.SEEK_END = 2; * Throw an error if (0 > pos >= end) or if (pos + size > end). * * Static utility function. + * + * @param {number} pos //TODO(JSDOC). + * @param {number} size //TODO(JSDOC). + * @param {number} end //TODO(JSDOC). */ ByteReader.validateRead = function(pos, size, end) { if (pos < 0 || pos >= end) @@ -63,6 +67,11 @@ ByteReader.validateRead = function(pos, size, end) { * * This is a static utility function. There is a member function with the * same name which side-effects the current read position. + * + * @param {DataView} dataView //TODO(JSDOC). + * @param {number} pos //TODO(JSDOC). + * @param {number} size //TODO(JSDOC). + * @param {number=} opt_end //TODO(JSDOC). * @return {string} //TODO(JSDOC). */ ByteReader.readString = function(dataView, pos, size, opt_end) { @@ -81,6 +90,11 @@ ByteReader.readString = function(dataView, pos, size, opt_end) { * * This is a static utility function. There is a member function with the * same name which side-effects the current read position. + * + * @param {DataView} dataView //TODO(JSDOC). + * @param {number} pos //TODO(JSDOC). + * @param {number} size //TODO(JSDOC). + * @param {number=} opt_end //TODO(JSDOC). * @return {string} //TODO(JSDOC). */ ByteReader.readNullTerminatedString = function(dataView, pos, size, opt_end) { @@ -102,6 +116,12 @@ ByteReader.readNullTerminatedString = function(dataView, pos, size, opt_end) { * * This is a static utility function. There is a member function with the * same name which side-effects the current read position. + * + * @param {DataView} dataView //TODO(JSDOC). + * @param {number} pos //TODO(JSDOC). + * @param {boolean} bom //TODO(JSDOC). + * @param {number} size //TODO(JSDOC). + * @param {number=} opt_end //TODO(JSDOC). * @return {string} //TODO(JSDOC). */ ByteReader.readNullTerminatedStringUTF16 = function( @@ -142,6 +162,11 @@ ByteReader.base64Alphabet_ = * * This is a static utility function. There is a member function with the * same name which side-effects the current read position. + * + * @param {DataView} dataView //TODO(JSDOC). + * @param {number} pos //TODO(JSDOC). + * @param {number} size //TODO(JSDOC). + * @param {number=} opt_end //TODO(JSDOC). * @return {string} //TODO(JSDOC). */ ByteReader.readBase64 = function(dataView, pos, size, opt_end) { @@ -187,6 +212,11 @@ ByteReader.readBase64 = function(dataView, pos, size, opt_end) { * * This is a static utility function. There is a member function with the * same name which side-effects the current read position. + * + * @param {DataView} dataView //TODO(JSDOC). + * @param {number} pos //TODO(JSDOC). + * @param {number} size //TODO(JSDOC). + * @param {number=} opt_end //TODO(JSDOC). * @return {string} //TODO(JSDOC). */ ByteReader.readImage = function(dataView, pos, size, opt_end) { @@ -213,6 +243,8 @@ ByteReader.readImage = function(dataView, pos, size, opt_end) { /** * Return true if the requested number of bytes can be read from the buffer. + * + * @param {number} size //TODO(JSDOC). * @return {boolean} //TODO(JSDOC). */ ByteReader.prototype.canRead = function(size) { @@ -245,6 +277,7 @@ ByteReader.prototype.beof = function() { /** * Set the expected byte ordering for future reads. + * @param {number} order //TODO(JSDOC). */ ByteReader.prototype.setByteOrder = function(order) { this.littleEndian_ = order == ByteReader.LITTLE_ENDIAN; @@ -256,6 +289,9 @@ ByteReader.prototype.setByteOrder = function(order) { * * You may optionally pass opt_end to override what is considered to be the * end of the buffer. + * + * @param {number} size //TODO(JSDOC). + * @param {number=} opt_end //TODO(JSDOC). */ ByteReader.prototype.validateRead = function(size, opt_end) { if (typeof opt_end == 'undefined') @@ -306,6 +342,9 @@ ByteReader.prototype.readScalar = function(width, opt_signed, opt_end) { * * Adjusts the current position on success. Throws an exception if the * read would go past the end of the buffer. + * + * @param {number} size //TODO(JSDOC). + * @param {number=} opt_end //TODO(JSDOC). * @return {string} //TODO(JSDOC). */ ByteReader.prototype.readString = function(size, opt_end) { @@ -320,6 +359,9 @@ ByteReader.prototype.readString = function(size, opt_end) { * * Adjusts the current position on success. Throws an exception if the * read would go past the end of the buffer. + * + * @param {number} size //TODO(JSDOC). + * @param {number=} opt_end //TODO(JSDOC). * @return {string} //TODO(JSDOC). */ ByteReader.prototype.readNullTerminatedString = function(size, opt_end) { @@ -344,6 +386,10 @@ ByteReader.prototype.readNullTerminatedString = function(size, opt_end) { * * Adjusts the current position on success. Throws an exception if the * read would go past the end of the buffer. + * + * @param {boolean} bom //TODO(JSDOC). + * @param {number} size //TODO(JSDOC). + * @param {number=} opt_end //TODO(JSDOC). * @return {string} //TODO(JSDOC). */ ByteReader.prototype.readNullTerminatedStringUTF16 = @@ -373,6 +419,10 @@ ByteReader.prototype.readNullTerminatedStringUTF16 = * * Adjusts the current position on success. Throws an exception if the * read would go past the end of the buffer. + * + * @param {number} size //TODO(JSDOC). + * @param {number=} opt_end //TODO(JSDOC). + * @param {function(new:Array.<*>)=} opt_arrayConstructor //TODO(JSDOC). * @return {Array.<*>} //TODO(JSDOC). */ ByteReader.prototype.readSlice = function(size, opt_end, @@ -393,6 +443,9 @@ ByteReader.prototype.readSlice = function(size, opt_end, * * Adjusts the current position on success. Throws an exception if the * read would go past the end of the buffer. + * + * @param {number} size //TODO(JSDOC). + * @param {number=} opt_end //TODO(JSDOC). * @return {string} //TODO(JSDOC). */ ByteReader.prototype.readBase64 = function(size, opt_end) { @@ -406,6 +459,9 @@ ByteReader.prototype.readBase64 = function(size, opt_end) { * * Adjusts the current position on success. Throws an exception if the * read would go past the end of the buffer. + * + * @param {number} size //TODO(JSDOC). + * @param {number=} opt_end //TODO(JSDOC). * @return {string} //TODO(JSDOC). */ ByteReader.prototype.readImage = function(size, opt_end) { @@ -416,6 +472,10 @@ ByteReader.prototype.readImage = function(size, opt_end) { /** * Seek to a give position relative to opt_seekStart. + * + * @param {number} pos //TODO(JSDOC). + * @param {number=} opt_seekStart //TODO(JSDOC). + * @param {number=} opt_end //TODO(JSDOC). */ ByteReader.prototype.seek = function(pos, opt_seekStart, opt_end) { opt_end = opt_end || this.view_.byteLength; @@ -440,6 +500,9 @@ ByteReader.prototype.seek = function(pos, opt_seekStart, opt_end) { * position. * * Recover the current position with a call to seekPop. + * + * @param {number} pos //TODO(JSDOC). + * @param {number=} opt_seekStart //TODO(JSDOC). */ ByteReader.prototype.pushSeek = function(pos, opt_seekStart) { var oldPos = this.pos_; diff --git a/chrome/browser/resources/file_manager/js/metadata/function_parallel.js b/chrome/browser/resources/file_manager/js/metadata/function_parallel.js index e8734b3..7cde5d2 100644 --- a/chrome/browser/resources/file_manager/js/metadata/function_parallel.js +++ b/chrome/browser/resources/file_manager/js/metadata/function_parallel.js @@ -6,7 +6,9 @@ * @constructor * @class FunctionSequence to invoke steps in sequence * + * @param {string} name //TODO(JSDOC). * @param steps array of functions to invoke in parallel. + * @param {Object} logger //TODO(JSDOC). * @param callback callback to invoke on success. * @param failureCallback callback to invoke on failure. */ @@ -56,6 +58,7 @@ FunctionParallel.prototype.nextStep_ = function() { /** * This function should be called only once on start, so start all the children * at once + * @param {...} var_args //TODO(JSDOC). */ FunctionParallel.prototype.start = function(var_args) { this.logger.vlog('Starting [' + this.steps_.length + '] parallel tasks with ' diff --git a/chrome/browser/resources/file_manager/js/metadata/function_sequence.js b/chrome/browser/resources/file_manager/js/metadata/function_sequence.js index e21fa4e..d54faa1 100644 --- a/chrome/browser/resources/file_manager/js/metadata/function_sequence.js +++ b/chrome/browser/resources/file_manager/js/metadata/function_sequence.js @@ -6,6 +6,7 @@ * @constructor * @class FunctionSequence to invoke steps in sequence * + * @param {string} name //TODO(JSDOC). * @param {Array} steps array of functions to invoke in sequence. * @param {Object} logger logger. * @param {Function} callback callback to invoke on success. @@ -82,6 +83,7 @@ FunctionSequence.prototype.finish_ = function() { * cases should be used nextStep function, which is defined in closure and thus * has access to internal variables of functionsequence. * @private + * @param {...} var_args //TODO(JSDOC). */ FunctionSequence.prototype.nextStep_ = function(var_args) { if (this.failed_) { @@ -105,6 +107,8 @@ FunctionSequence.prototype.nextStep_ = function(var_args) { /** * This function should be called only once on start, so start sequence pipeline + * @param {...} var_args //TODO(JSDOC). + */ */ FunctionSequence.prototype.start = function(var_args) { if (this.started) { @@ -120,6 +124,8 @@ FunctionSequence.prototype.start = function(var_args) { /** * Add Function object mimics to FunctionSequence * @private + * @param {*} obj //TODO(JSDOC). + * @param {Array.*} args /TODO(JSDOC). */ FunctionSequence.prototype.apply_ = function(obj, args) { this.start.apply(this, args); diff --git a/chrome/browser/resources/file_manager/js/metadata/id3_parser.js b/chrome/browser/resources/file_manager/js/metadata/id3_parser.js index 8e29fd3..e23e1b8 100644 --- a/chrome/browser/resources/file_manager/js/metadata/id3_parser.js +++ b/chrome/browser/resources/file_manager/js/metadata/id3_parser.js @@ -176,6 +176,7 @@ Id3Parser.prototype.readAPIC_ = function(reader, majorVersion, frame, end) { * * @private * @param {ByteReader} reader reader to use. + * @param {number} majorVersion //TODO(JSDOC). * @return {Object} frame read. */ Id3Parser.prototype.readFrame_ = function(reader, majorVersion) { |