Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: chrome/browser/resources/file_manager/js/metadata/id3_parser.js

Issue 12212160: [Cleanup] Files.app: Fill 'TODO' comments to missing descriptions in @return annotation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/file_manager/js/image_editor/image_adjust.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 importScripts('function_sequence.js'); 5 importScripts('function_sequence.js');
6 importScripts('function_parallel.js'); 6 importScripts('function_parallel.js');
7 7
8 function Id3Parser(parent) { 8 function Id3Parser(parent) {
9 MetadataParser.call(this, parent, 'id3', /\.(mp3)$/i); 9 MetadataParser.call(this, parent, 'id3', /\.(mp3)$/i);
10 } 10 }
11 11
12 Id3Parser.prototype = {__proto__: MetadataParser.prototype}; 12 Id3Parser.prototype = {__proto__: MetadataParser.prototype};
13 13
14 /** 14 /**
15 * Reads synchsafe integer. 15 * Reads synchsafe integer.
16 * 'SynchSafe' term is taken from id3 documentation. 16 * 'SynchSafe' term is taken from id3 documentation.
17 * 17 *
18 * @private 18 * @private
19 * @param {ByteReader} reader - reader to use. 19 * @param {ByteReader} reader - reader to use.
20 * @param {int} length - bytes to read. 20 * @param {int} length - bytes to read.
21 * @return {int} 21 * @return {int} //TODO(JSDOC).
22 */ 22 */
23 Id3Parser.readSynchSafe_ = function(reader, length) { 23 Id3Parser.readSynchSafe_ = function(reader, length) {
24 var rv = 0; 24 var rv = 0;
25 25
26 switch (length) { 26 switch (length) {
27 case 4: 27 case 4:
28 rv = reader.readScalar(1, false) << 21; 28 rv = reader.readScalar(1, false) << 21;
29 case 3: 29 case 3:
30 rv |= reader.readScalar(1, false) << 14; 30 rv |= reader.readScalar(1, false) << 14;
31 case 2: 31 case 2:
32 rv |= reader.readScalar(1, false) << 7; 32 rv |= reader.readScalar(1, false) << 7;
33 case 1: 33 case 1:
34 rv |= reader.readScalar(1, false); 34 rv |= reader.readScalar(1, false);
35 } 35 }
36 36
37 return rv; 37 return rv;
38 }; 38 };
39 39
40 /** 40 /**
41 * Reads 3bytes integer. 41 * Reads 3bytes integer.
42 * 42 *
43 * @private 43 * @private
44 * @param {ByteReader} reader - reader to use. 44 * @param {ByteReader} reader - reader to use.
45 * @return {int} //TODO(JSDOC).
45 * @return {int} 46 * @return {int}
46 */ 47 */
47 Id3Parser.readUInt24_ = function(reader) { 48 Id3Parser.readUInt24_ = function(reader) {
48 return reader.readScalar(2, false) << 16 | reader.readScalar(1, false); 49 return reader.readScalar(2, false) << 16 | reader.readScalar(1, false);
49 }; 50 };
50 51
51 /** 52 /**
52 * Reads string from reader with specified encoding 53 * Reads string from reader with specified encoding
53 * 54 *
54 * @private 55 * @private
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 TYER: 'ID3_YEAR', 696 TYER: 'ID3_YEAR',
696 WCOP: 'ID3_COPYRIGHT', 697 WCOP: 'ID3_COPYRIGHT',
697 WOAF: 'ID3_OFFICIAL_AUDIO_FILE_WEBPAGE', 698 WOAF: 'ID3_OFFICIAL_AUDIO_FILE_WEBPAGE',
698 WOAR: 'ID3_OFFICIAL_ARTIST', 699 WOAR: 'ID3_OFFICIAL_ARTIST',
699 WOAS: 'ID3_OFFICIAL_AUDIO_SOURCE_WEBPAGE', 700 WOAS: 'ID3_OFFICIAL_AUDIO_SOURCE_WEBPAGE',
700 WPUB: 'ID3_PUBLISHERS_OFFICIAL_WEBPAGE' 701 WPUB: 'ID3_PUBLISHERS_OFFICIAL_WEBPAGE'
701 } 702 }
702 }; 703 };
703 704
704 MetadataDispatcher.registerParserClass(Id3Parser); 705 MetadataDispatcher.registerParserClass(Id3Parser);
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/image_editor/image_adjust.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698