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

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

Issue 10874067: chromeos: Move src/chrome/browser/chromeos/disks to src/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 */ 341 */
342 VolumeManager.prototype.isUnreadable = function(mountPath) { 342 VolumeManager.prototype.isUnreadable = function(mountPath) {
343 var error = this.getMountError(mountPath); 343 var error = this.getMountError(mountPath);
344 return error == VolumeManager.Error.UNKNOWN_FILESYSTEM || 344 return error == VolumeManager.Error.UNKNOWN_FILESYSTEM ||
345 error == VolumeManager.Error.UNSUPPORTED_FILESYSTEM; 345 error == VolumeManager.Error.UNSUPPORTED_FILESYSTEM;
346 }; 346 };
347 347
348 /** 348 /**
349 * @param {string} mountPath Volume mounted path. 349 * @param {string} mountPath Volume mounted path.
350 * @return {string} Device type ('usb'|'sd'|'optical'|'mobile'|'unknown') 350 * @return {string} Device type ('usb'|'sd'|'optical'|'mobile'|'unknown')
351 * (as defined in chrome/browser/chromeos/disks/disk_mount_manager.cc). 351 * (as defined in chromeos/disks/disk_mount_manager.cc).
352 */ 352 */
353 VolumeManager.prototype.getDeviceType = function(mountPath) { 353 VolumeManager.prototype.getDeviceType = function(mountPath) {
354 return this.getVolumeInfo_(mountPath).deviceType; 354 return this.getVolumeInfo_(mountPath).deviceType;
355 }; 355 };
356 356
357 /** 357 /**
358 * @param {string} mountPath Volume mounted path. 358 * @param {string} mountPath Volume mounted path.
359 * @return {boolean} True if volume at |mountedPath| is read only. 359 * @return {boolean} True if volume at |mountedPath| is read only.
360 */ 360 */
361 VolumeManager.prototype.isReadOnly = function(mountPath) { 361 VolumeManager.prototype.isReadOnly = function(mountPath) {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 }; 484 };
485 485
486 /** 486 /**
487 * @param {string} mountPath Mount path. 487 * @param {string} mountPath Mount path.
488 * @private 488 * @private
489 */ 489 */
490 VolumeManager.prototype.validateMountPath_ = function(mountPath) { 490 VolumeManager.prototype.validateMountPath_ = function(mountPath) {
491 if (!/^\/(((archive|removable)\/[^\/]+)|drive|Downloads)$/.test(mountPath)) 491 if (!/^\/(((archive|removable)\/[^\/]+)|drive|Downloads)$/.test(mountPath))
492 throw new Error('Invalid mount path: ', mountPath); 492 throw new Error('Invalid mount path: ', mountPath);
493 }; 493 };
OLDNEW
« no previous file with comments | « chrome/browser/media_gallery/media_device_notifications_chromeos_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698