| OLD | NEW |
| 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 * VolumeManager is responsible for tracking list of mounted volumes. | 6 * VolumeManager is responsible for tracking list of mounted volumes. |
| 7 * | 7 * |
| 8 * @constructor | 8 * @constructor |
| 9 * @extends {cr.EventTarget} | 9 * @extends {cr.EventTarget} |
| 10 */ | 10 */ |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 /* Internal errors */ | 41 /* Internal errors */ |
| 42 NOT_MOUNTED: 'not_mounted', | 42 NOT_MOUNTED: 'not_mounted', |
| 43 TIMEOUT: 'timeout', | 43 TIMEOUT: 'timeout', |
| 44 | 44 |
| 45 /* System events */ | 45 /* System events */ |
| 46 UNKNOWN: 'error_unknown', | 46 UNKNOWN: 'error_unknown', |
| 47 INTERNAL: 'error_internal', | 47 INTERNAL: 'error_internal', |
| 48 UNKNOWN_FILESYSTEM: 'error_unknown_filesystem', | 48 UNKNOWN_FILESYSTEM: 'error_unknown_filesystem', |
| 49 UNSUPPORTED_FILESYSTEM: 'error_unsupported_filesystem', | 49 UNSUPPORTED_FILESYSTEM: 'error_unsupported_filesystem', |
| 50 INVALID_ARCHIVE: 'error_invalid_archive', | 50 INVALID_ARCHIVE: 'error_invalid_archive', |
| 51 LIBCROS_MISSING: 'error_libcros_missing', | |
| 52 AUTHENTICATION: 'error_authentication', | 51 AUTHENTICATION: 'error_authentication', |
| 53 PATH_UNMOUNTED: 'error_path_unmounted' | 52 PATH_UNMOUNTED: 'error_path_unmounted' |
| 54 }; | 53 }; |
| 55 | 54 |
| 56 /** | 55 /** |
| 57 * @enum | 56 * @enum |
| 58 */ | 57 */ |
| 59 VolumeManager.GDataStatus = { | 58 VolumeManager.GDataStatus = { |
| 60 UNMOUNTED: 'unmounted', | 59 UNMOUNTED: 'unmounted', |
| 61 MOUNTING: 'mounting', | 60 MOUNTING: 'mounting', |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 }; | 447 }; |
| 449 | 448 |
| 450 /** | 449 /** |
| 451 * @param {string} mountPath Mount path. | 450 * @param {string} mountPath Mount path. |
| 452 * @private | 451 * @private |
| 453 */ | 452 */ |
| 454 VolumeManager.prototype.validateMountPath_ = function(mountPath) { | 453 VolumeManager.prototype.validateMountPath_ = function(mountPath) { |
| 455 if (!/^\/(((archive|removable)\/[^\/]+)|drive|Downloads)$/.test(mountPath)) | 454 if (!/^\/(((archive|removable)\/[^\/]+)|drive|Downloads)$/.test(mountPath)) |
| 456 throw new Error('Invalid mount path: ', mountPath); | 455 throw new Error('Invalid mount path: ', mountPath); |
| 457 }; | 456 }; |
| OLD | NEW |