Commit 2ee44aea authored by yoshiki@chromium.org's avatar yoshiki@chromium.org

[Cleanup] Files.app: adds '@private' annotations to JSdoc of private methods.

All the changes are in comment. No semantics are changed.

BUG=175657
TEST=none
TBR=mtomasz@chromium.org

Review URL: https://codereview.chromium.org/12207152

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182237 0039d316-1c4b-4281-b951-d872f2087c98
parent 2039b13c
...@@ -31,6 +31,7 @@ function FunctionParallel(name, steps, logger, callback, failureCallback) { ...@@ -31,6 +31,7 @@ function FunctionParallel(name, steps, logger, callback, failureCallback) {
/** /**
* Error handling function, which fires error callback. * Error handling function, which fires error callback.
* *
* @private
* @param err error message. * @param err error message.
*/ */
FunctionParallel.prototype.onError_ = function(err) { FunctionParallel.prototype.onError_ = function(err) {
...@@ -44,6 +45,7 @@ FunctionParallel.prototype.onError_ = function(err) { ...@@ -44,6 +45,7 @@ FunctionParallel.prototype.onError_ = function(err) {
* Advances to next step. This method should not be used externally. In external * Advances to next step. This method should not be used externally. In external
* 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
*/ */
FunctionParallel.prototype.nextStep_ = function() { FunctionParallel.prototype.nextStep_ = function() {
if (--this.remaining == 0 && !this.failed_) { if (--this.remaining == 0 && !this.failed_) {
......
...@@ -50,6 +50,7 @@ FunctionSequence.prototype.setFailureCallback = function(failureCallback) { ...@@ -50,6 +50,7 @@ FunctionSequence.prototype.setFailureCallback = function(failureCallback) {
* Error handling function, which traces current error step, stops sequence * Error handling function, which traces current error step, stops sequence
* advancing and fires error callback. * advancing and fires error callback.
* *
* @private
* @param err error message. * @param err error message.
*/ */
FunctionSequence.prototype.onError_ = function(err) { FunctionSequence.prototype.onError_ = function(err) {
...@@ -66,6 +67,7 @@ FunctionSequence.prototype.onError_ = function(err) { ...@@ -66,6 +67,7 @@ FunctionSequence.prototype.onError_ = function(err) {
* This method should not be used externally. In external * This method should not be used externally. In external
* cases should be used finish function, which is defined in closure and thus * cases should be used finish function, which is defined in closure and thus
* has access to internal variables of functionsequence. * has access to internal variables of functionsequence.
* @private
*/ */
FunctionSequence.prototype.finish_ = function() { FunctionSequence.prototype.finish_ = function() {
if (!this.failed_ && this.currentStepIdx_ < this.steps_.length) { if (!this.failed_ && this.currentStepIdx_ < this.steps_.length) {
...@@ -79,6 +81,7 @@ FunctionSequence.prototype.finish_ = function() { ...@@ -79,6 +81,7 @@ FunctionSequence.prototype.finish_ = function() {
* This method should not be used externally. In external * This method should not be used externally. In external
* 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
*/ */
FunctionSequence.prototype.nextStep_ = function(var_args) { FunctionSequence.prototype.nextStep_ = function(var_args) {
if (this.failed_) { if (this.failed_) {
...@@ -116,8 +119,8 @@ FunctionSequence.prototype.start = function(var_args) { ...@@ -116,8 +119,8 @@ FunctionSequence.prototype.start = function(var_args) {
/** /**
* Add Function object mimics to FunctionSequence * Add Function object mimics to FunctionSequence
* @private
*/ */
FunctionSequence.prototype.apply_ = function(obj, args) { FunctionSequence.prototype.apply_ = function(obj, args) {
this.start.apply(this, args); this.start.apply(this, args);
}; };
...@@ -15,6 +15,7 @@ Id3Parser.prototype = {__proto__: MetadataParser.prototype}; ...@@ -15,6 +15,7 @@ Id3Parser.prototype = {__proto__: MetadataParser.prototype};
* Reads synchsafe integer. * Reads synchsafe integer.
* 'SynchSafe' term is taken from id3 documentation. * 'SynchSafe' term is taken from id3 documentation.
* *
* @private
* @param {ByteReader} reader - reader to use. * @param {ByteReader} reader - reader to use.
* @param {int} length - bytes to read. * @param {int} length - bytes to read.
* @return {int} * @return {int}
...@@ -39,6 +40,7 @@ Id3Parser.readSynchSafe_ = function(reader, length) { ...@@ -39,6 +40,7 @@ Id3Parser.readSynchSafe_ = function(reader, length) {
/** /**
* Reads 3bytes integer. * Reads 3bytes integer.
* *
* @private
* @param {ByteReader} reader - reader to use. * @param {ByteReader} reader - reader to use.
* @return {int} * @return {int}
*/ */
...@@ -49,10 +51,10 @@ Id3Parser.readUInt24_ = function(reader) { ...@@ -49,10 +51,10 @@ Id3Parser.readUInt24_ = function(reader) {
/** /**
* Reads string from reader with specified encoding * Reads string from reader with specified encoding
* *
* @private
* @param {ByteReader} reader reader to use. * @param {ByteReader} reader reader to use.
* @param {int} encoding string encoding. * @param {int} encoding string encoding.
* @param {int} size maximum string size. Actual result may be shorter. * @param {int} size maximum string size. Actual result may be shorter.
*
*/ */
Id3Parser.prototype.readString_ = function(reader, encoding, size) { Id3Parser.prototype.readString_ = function(reader, encoding, size) {
switch (encoding) { switch (encoding) {
...@@ -80,6 +82,7 @@ Id3Parser.prototype.readString_ = function(reader, encoding, size) { ...@@ -80,6 +82,7 @@ Id3Parser.prototype.readString_ = function(reader, encoding, size) {
/** /**
* Reads text frame from reader. * Reads text frame from reader.
* *
* @private
* @param {ByteReader} reader reader to use. * @param {ByteReader} reader reader to use.
* @param {int} majorVersion major id3 version to use. * @param {int} majorVersion major id3 version to use.
* @param {Object} frame frame so store data at. * @param {Object} frame frame so store data at.
...@@ -96,6 +99,7 @@ Id3Parser.prototype.readTextFrame_ = function(reader, ...@@ -96,6 +99,7 @@ Id3Parser.prototype.readTextFrame_ = function(reader,
/** /**
* Reads user defined text frame from reader. * Reads user defined text frame from reader.
* *
* @private
* @param {ByteReader} reader reader to use. * @param {ByteReader} reader reader to use.
* @param {int} majorVersion major id3 version to use. * @param {int} majorVersion major id3 version to use.
* @param {Object} frame frame so store data at. * @param {Object} frame frame so store data at.
...@@ -118,6 +122,9 @@ Id3Parser.prototype.readUserDefinedTextFrame_ = function(reader, ...@@ -118,6 +122,9 @@ Id3Parser.prototype.readUserDefinedTextFrame_ = function(reader,
end - reader.tell()); end - reader.tell());
}; };
/**
* @private
*/
Id3Parser.prototype.readPIC_ = function(reader, majorVersion, frame, end) { Id3Parser.prototype.readPIC_ = function(reader, majorVersion, frame, end) {
frame.encoding = reader.readScalar(1, false, end); frame.encoding = reader.readScalar(1, false, end);
frame.format = reader.readNullTerminatedString(3, end - reader.tell()); frame.format = reader.readNullTerminatedString(3, end - reader.tell());
...@@ -134,6 +141,9 @@ Id3Parser.prototype.readPIC_ = function(reader, majorVersion, frame, end) { ...@@ -134,6 +141,9 @@ Id3Parser.prototype.readPIC_ = function(reader, majorVersion, frame, end) {
} }
}; };
/**
* @private
*/
Id3Parser.prototype.readAPIC_ = function(reader, majorVersion, frame, end) { Id3Parser.prototype.readAPIC_ = function(reader, majorVersion, frame, end) {
this.vlog('Extracting picture'); this.vlog('Extracting picture');
frame.encoding = reader.readScalar(1, false, end); frame.encoding = reader.readScalar(1, false, end);
...@@ -154,6 +164,7 @@ Id3Parser.prototype.readAPIC_ = function(reader, majorVersion, frame, end) { ...@@ -154,6 +164,7 @@ Id3Parser.prototype.readAPIC_ = function(reader, majorVersion, frame, end) {
/** /**
* Reads string from reader with specified encoding * Reads string from reader with specified encoding
* *
* @private
* @param {ByteReader} reader reader to use. * @param {ByteReader} reader reader to use.
* @return {Object} frame read. * @return {Object} frame read.
*/ */
......
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