Commit 17e5c0d9 authored by yoshiki@chromium.org's avatar yoshiki@chromium.org

[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/12212185

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182417 0039d316-1c4b-4281-b951-d872f2087c98
parent 90ed7179
...@@ -49,6 +49,10 @@ ByteReader.SEEK_END = 2; ...@@ -49,6 +49,10 @@ ByteReader.SEEK_END = 2;
* Throw an error if (0 > pos >= end) or if (pos + size > end). * Throw an error if (0 > pos >= end) or if (pos + size > end).
* *
* Static utility function. * Static utility function.
*
* @param {number} pos //TODO(JSDOC).
* @param {number} size //TODO(JSDOC).
* @param {number} end //TODO(JSDOC).
*/ */
ByteReader.validateRead = function(pos, size, end) { ByteReader.validateRead = function(pos, size, end) {
if (pos < 0 || pos >= end) if (pos < 0 || pos >= end)
...@@ -63,6 +67,11 @@ ByteReader.validateRead = function(pos, size, end) { ...@@ -63,6 +67,11 @@ ByteReader.validateRead = function(pos, size, end) {
* *
* This is a static utility function. There is a member function with the * This is a static utility function. There is a member function with the
* same name which side-effects the current read position. * 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). * @return {string} //TODO(JSDOC).
*/ */
ByteReader.readString = function(dataView, pos, size, opt_end) { ByteReader.readString = function(dataView, pos, size, opt_end) {
...@@ -81,6 +90,11 @@ 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 * This is a static utility function. There is a member function with the
* same name which side-effects the current read position. * 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). * @return {string} //TODO(JSDOC).
*/ */
ByteReader.readNullTerminatedString = function(dataView, pos, size, opt_end) { ByteReader.readNullTerminatedString = function(dataView, pos, size, opt_end) {
...@@ -102,6 +116,12 @@ 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 * This is a static utility function. There is a member function with the
* same name which side-effects the current read position. * 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). * @return {string} //TODO(JSDOC).
*/ */
ByteReader.readNullTerminatedStringUTF16 = function( ByteReader.readNullTerminatedStringUTF16 = function(
...@@ -142,6 +162,11 @@ ByteReader.base64Alphabet_ = ...@@ -142,6 +162,11 @@ ByteReader.base64Alphabet_ =
* *
* This is a static utility function. There is a member function with the * This is a static utility function. There is a member function with the
* same name which side-effects the current read position. * 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). * @return {string} //TODO(JSDOC).
*/ */
ByteReader.readBase64 = function(dataView, pos, size, opt_end) { ByteReader.readBase64 = function(dataView, pos, size, opt_end) {
...@@ -187,6 +212,11 @@ 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 * This is a static utility function. There is a member function with the
* same name which side-effects the current read position. * 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). * @return {string} //TODO(JSDOC).
*/ */
ByteReader.readImage = function(dataView, pos, size, opt_end) { ByteReader.readImage = function(dataView, pos, size, opt_end) {
...@@ -213,6 +243,8 @@ 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. * Return true if the requested number of bytes can be read from the buffer.
*
* @param {number} size //TODO(JSDOC).
* @return {boolean} //TODO(JSDOC). * @return {boolean} //TODO(JSDOC).
*/ */
ByteReader.prototype.canRead = function(size) { ByteReader.prototype.canRead = function(size) {
...@@ -245,6 +277,7 @@ ByteReader.prototype.beof = function() { ...@@ -245,6 +277,7 @@ ByteReader.prototype.beof = function() {
/** /**
* Set the expected byte ordering for future reads. * Set the expected byte ordering for future reads.
* @param {number} order //TODO(JSDOC).
*/ */
ByteReader.prototype.setByteOrder = function(order) { ByteReader.prototype.setByteOrder = function(order) {
this.littleEndian_ = order == ByteReader.LITTLE_ENDIAN; this.littleEndian_ = order == ByteReader.LITTLE_ENDIAN;
...@@ -256,6 +289,9 @@ ByteReader.prototype.setByteOrder = function(order) { ...@@ -256,6 +289,9 @@ ByteReader.prototype.setByteOrder = function(order) {
* *
* You may optionally pass opt_end to override what is considered to be the * You may optionally pass opt_end to override what is considered to be the
* end of the buffer. * end of the buffer.
*
* @param {number} size //TODO(JSDOC).
* @param {number=} opt_end //TODO(JSDOC).
*/ */
ByteReader.prototype.validateRead = function(size, opt_end) { ByteReader.prototype.validateRead = function(size, opt_end) {
if (typeof opt_end == 'undefined') if (typeof opt_end == 'undefined')
...@@ -306,6 +342,9 @@ ByteReader.prototype.readScalar = function(width, opt_signed, opt_end) { ...@@ -306,6 +342,9 @@ ByteReader.prototype.readScalar = function(width, opt_signed, opt_end) {
* *
* Adjusts the current position on success. Throws an exception if the * Adjusts the current position on success. Throws an exception if the
* read would go past the end of the buffer. * read would go past the end of the buffer.
*
* @param {number} size //TODO(JSDOC).
* @param {number=} opt_end //TODO(JSDOC).
* @return {string} //TODO(JSDOC). * @return {string} //TODO(JSDOC).
*/ */
ByteReader.prototype.readString = function(size, opt_end) { ByteReader.prototype.readString = function(size, opt_end) {
...@@ -320,6 +359,9 @@ 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 * Adjusts the current position on success. Throws an exception if the
* read would go past the end of the buffer. * read would go past the end of the buffer.
*
* @param {number} size //TODO(JSDOC).
* @param {number=} opt_end //TODO(JSDOC).
* @return {string} //TODO(JSDOC). * @return {string} //TODO(JSDOC).
*/ */
ByteReader.prototype.readNullTerminatedString = function(size, opt_end) { ByteReader.prototype.readNullTerminatedString = function(size, opt_end) {
...@@ -344,6 +386,10 @@ 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 * Adjusts the current position on success. Throws an exception if the
* read would go past the end of the buffer. * 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). * @return {string} //TODO(JSDOC).
*/ */
ByteReader.prototype.readNullTerminatedStringUTF16 = ByteReader.prototype.readNullTerminatedStringUTF16 =
...@@ -373,6 +419,10 @@ ByteReader.prototype.readNullTerminatedStringUTF16 = ...@@ -373,6 +419,10 @@ ByteReader.prototype.readNullTerminatedStringUTF16 =
* *
* Adjusts the current position on success. Throws an exception if the * Adjusts the current position on success. Throws an exception if the
* read would go past the end of the buffer. * 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). * @return {Array.<*>} //TODO(JSDOC).
*/ */
ByteReader.prototype.readSlice = function(size, opt_end, ByteReader.prototype.readSlice = function(size, opt_end,
...@@ -393,6 +443,9 @@ 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 * Adjusts the current position on success. Throws an exception if the
* read would go past the end of the buffer. * read would go past the end of the buffer.
*
* @param {number} size //TODO(JSDOC).
* @param {number=} opt_end //TODO(JSDOC).
* @return {string} //TODO(JSDOC). * @return {string} //TODO(JSDOC).
*/ */
ByteReader.prototype.readBase64 = function(size, opt_end) { ByteReader.prototype.readBase64 = function(size, opt_end) {
...@@ -406,6 +459,9 @@ 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 * Adjusts the current position on success. Throws an exception if the
* read would go past the end of the buffer. * read would go past the end of the buffer.
*
* @param {number} size //TODO(JSDOC).
* @param {number=} opt_end //TODO(JSDOC).
* @return {string} //TODO(JSDOC). * @return {string} //TODO(JSDOC).
*/ */
ByteReader.prototype.readImage = function(size, opt_end) { ByteReader.prototype.readImage = function(size, opt_end) {
...@@ -416,6 +472,10 @@ 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. * 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) { ByteReader.prototype.seek = function(pos, opt_seekStart, opt_end) {
opt_end = opt_end || this.view_.byteLength; opt_end = opt_end || this.view_.byteLength;
...@@ -440,6 +500,9 @@ ByteReader.prototype.seek = function(pos, opt_seekStart, opt_end) { ...@@ -440,6 +500,9 @@ ByteReader.prototype.seek = function(pos, opt_seekStart, opt_end) {
* position. * position.
* *
* Recover the current position with a call to seekPop. * 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) { ByteReader.prototype.pushSeek = function(pos, opt_seekStart) {
var oldPos = this.pos_; var oldPos = this.pos_;
......
...@@ -6,7 +6,9 @@ ...@@ -6,7 +6,9 @@
* @constructor * @constructor
* @class FunctionSequence to invoke steps in sequence * @class FunctionSequence to invoke steps in sequence
* *
* @param {string} name //TODO(JSDOC).
* @param steps array of functions to invoke in parallel. * @param steps array of functions to invoke in parallel.
* @param {Object} logger //TODO(JSDOC).
* @param callback callback to invoke on success. * @param callback callback to invoke on success.
* @param failureCallback callback to invoke on failure. * @param failureCallback callback to invoke on failure.
*/ */
...@@ -56,6 +58,7 @@ FunctionParallel.prototype.nextStep_ = function() { ...@@ -56,6 +58,7 @@ FunctionParallel.prototype.nextStep_ = function() {
/** /**
* This function should be called only once on start, so start all the children * This function should be called only once on start, so start all the children
* at once * at once
* @param {...} var_args //TODO(JSDOC).
*/ */
FunctionParallel.prototype.start = function(var_args) { FunctionParallel.prototype.start = function(var_args) {
this.logger.vlog('Starting [' + this.steps_.length + '] parallel tasks with ' this.logger.vlog('Starting [' + this.steps_.length + '] parallel tasks with '
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
* @constructor * @constructor
* @class FunctionSequence to invoke steps in sequence * @class FunctionSequence to invoke steps in sequence
* *
* @param {string} name //TODO(JSDOC).
* @param {Array} steps array of functions to invoke in sequence. * @param {Array} steps array of functions to invoke in sequence.
* @param {Object} logger logger. * @param {Object} logger logger.
* @param {Function} callback callback to invoke on success. * @param {Function} callback callback to invoke on success.
...@@ -82,6 +83,7 @@ FunctionSequence.prototype.finish_ = function() { ...@@ -82,6 +83,7 @@ FunctionSequence.prototype.finish_ = function() {
* cases should be used nextStep function, which is defined in closure and thus * cases should be used nextStep function, which is defined in closure and thus
* has access to internal variables of functionsequence. * has access to internal variables of functionsequence.
* @private * @private
* @param {...} var_args //TODO(JSDOC).
*/ */
FunctionSequence.prototype.nextStep_ = function(var_args) { FunctionSequence.prototype.nextStep_ = function(var_args) {
if (this.failed_) { if (this.failed_) {
...@@ -105,6 +107,7 @@ FunctionSequence.prototype.nextStep_ = function(var_args) { ...@@ -105,6 +107,7 @@ FunctionSequence.prototype.nextStep_ = function(var_args) {
/** /**
* This function should be called only once on start, so start sequence pipeline * This function should be called only once on start, so start sequence pipeline
* @param {...} var_args //TODO(JSDOC).
*/ */
FunctionSequence.prototype.start = function(var_args) { FunctionSequence.prototype.start = function(var_args) {
if (this.started) { if (this.started) {
...@@ -120,6 +123,8 @@ FunctionSequence.prototype.start = function(var_args) { ...@@ -120,6 +123,8 @@ FunctionSequence.prototype.start = function(var_args) {
/** /**
* Add Function object mimics to FunctionSequence * Add Function object mimics to FunctionSequence
* @private * @private
* @param {*} obj //TODO(JSDOC).
* @param {Array.*} args /TODO(JSDOC).
*/ */
FunctionSequence.prototype.apply_ = function(obj, args) { FunctionSequence.prototype.apply_ = function(obj, args) {
this.start.apply(this, args); this.start.apply(this, args);
......
...@@ -176,6 +176,7 @@ Id3Parser.prototype.readAPIC_ = function(reader, majorVersion, frame, end) { ...@@ -176,6 +176,7 @@ Id3Parser.prototype.readAPIC_ = function(reader, majorVersion, frame, end) {
* *
* @private * @private
* @param {ByteReader} reader reader to use. * @param {ByteReader} reader reader to use.
* @param {number} majorVersion //TODO(JSDOC).
* @return {Object} frame read. * @return {Object} frame read.
*/ */
Id3Parser.prototype.readFrame_ = function(reader, majorVersion) { Id3Parser.prototype.readFrame_ = function(reader, majorVersion) {
......
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