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

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

Issue 12716015: filemanager: Files App change necessary to use "drive/root". It still works with "drive". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
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 * 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 return; 513 return;
514 } 514 }
515 throw new Error('Invalid mount error: ', error); 515 throw new Error('Invalid mount error: ', error);
516 }; 516 };
517 517
518 /** 518 /**
519 * @param {string} mountPath Mount path. 519 * @param {string} mountPath Mount path.
520 * @private 520 * @private
521 */ 521 */
522 VolumeManager.prototype.validateMountPath_ = function(mountPath) { 522 VolumeManager.prototype.validateMountPath_ = function(mountPath) {
523 if (!/^\/(((archive|removable)\/[^\/]+)|drive|drive_offline|Downloads)$/. 523 console.log(mountPath);
524 test(mountPath)) 524 if (!/^\/(drive|drive_offline|Downloads)$/.test(mountPath) &&
525 !/^\/((archive|removable|drive)\/[^\/]+)$/.test(mountPath))
525 throw new Error('Invalid mount path: ', mountPath); 526 throw new Error('Invalid mount path: ', mountPath);
526 }; 527 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698