| 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 'use strict'; | 5 'use strict'; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * VolumeManager is responsible for tracking list of mounted volumes. | 8 * VolumeManager is responsible for tracking list of mounted volumes. |
| 9 * | 9 * |
| 10 * @constructor | 10 * @constructor |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 return; | 579 return; |
| 580 } | 580 } |
| 581 throw new Error('Invalid mount error: ', error); | 581 throw new Error('Invalid mount error: ', error); |
| 582 }; | 582 }; |
| 583 | 583 |
| 584 /** | 584 /** |
| 585 * @param {string} mountPath Mount path. | 585 * @param {string} mountPath Mount path. |
| 586 * @private | 586 * @private |
| 587 */ | 587 */ |
| 588 VolumeManager.prototype.validateMountPath_ = function(mountPath) { | 588 VolumeManager.prototype.validateMountPath_ = function(mountPath) { |
| 589 if (!/^\/(drive|drive_offline|Downloads)$/.test(mountPath) && | 589 if (!/^\/(drive|drive_shared_with_me|drive_offline|Downloads)$/ |
| 590 .test(mountPath) && |
| 590 !/^\/((archive|removable|drive)\/[^\/]+)$/.test(mountPath)) | 591 !/^\/((archive|removable|drive)\/[^\/]+)$/.test(mountPath)) |
| 591 throw new Error('Invalid mount path: ', mountPath); | 592 throw new Error('Invalid mount path: ', mountPath); |
| 592 }; | 593 }; |
| OLD | NEW |