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

Side by Side Diff: chrome/browser/resources/file_manager/js/util.js

Issue 12211123: [Cleanup] Files.app: Add missing semi-colons after function declaration. (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/mock_chrome.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 /** 5 /**
6 * Namespace for utility functions. 6 * Namespace for utility functions.
7 */ 7 */
8 var util = {}; 8 var util = {};
9 9
10 /** 10 /**
(...skipping 30 matching lines...) Expand all
41 * Install a sensible toString() on the FileError object. 41 * Install a sensible toString() on the FileError object.
42 * 42 *
43 * FileError.prototype.code is a numeric code describing the cause of the 43 * FileError.prototype.code is a numeric code describing the cause of the
44 * error. The FileError constructor has a named property for each possible 44 * error. The FileError constructor has a named property for each possible
45 * error code, but provides no way to map the code to the named property. 45 * error code, but provides no way to map the code to the named property.
46 * This toString() implementation fixes that. 46 * This toString() implementation fixes that.
47 */ 47 */
48 util.installFileErrorToString = function() { 48 util.installFileErrorToString = function() {
49 FileError.prototype.toString = function() { 49 FileError.prototype.toString = function() {
50 return '[object FileError: ' + util.getFileErrorMnemonic(this.code) + ']'; 50 return '[object FileError: ' + util.getFileErrorMnemonic(this.code) + ']';
51 } 51 };
52 }; 52 };
53 53
54 /** 54 /**
55 * @param {number} code The file error code. 55 * @param {number} code The file error code.
56 * @return {string} The file error mnemonic. 56 * @return {string} The file error mnemonic.
57 */ 57 */
58 util.getFileErrorMnemonic = function(code) { 58 util.getFileErrorMnemonic = function(code) {
59 for (var key in FileError) { 59 for (var key in FileError) {
60 if (key.search(/_ERR$/) != -1 && FileError[key] == code) 60 if (key.search(/_ERR$/) != -1 && FileError[key] == code)
61 return key; 61 return key;
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1251 * overriden). 1251 * overriden).
1252 * @param {Object} object The object. 1252 * @param {Object} object The object.
1253 * @param {string} propertyName The property name. 1253 * @param {string} propertyName The property name.
1254 * @param {*} value Value to set. 1254 * @param {*} value Value to set.
1255 */ 1255 */
1256 util.callInheritedSetter = function(object, propertyName, value) { 1256 util.callInheritedSetter = function(object, propertyName, value) {
1257 var d = util.findPropertyDescriptor(Object.getPrototypeOf(object), 1257 var d = util.findPropertyDescriptor(Object.getPrototypeOf(object),
1258 propertyName); 1258 propertyName);
1259 d.set.call(object, value); 1259 d.set.call(object, value);
1260 }; 1260 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/mock_chrome.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698