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

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

Issue 120533006: Stub for Privet file system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * Represents each volume, such as "drive", "download directory", each "USB 8 * Represents each volume, such as "drive", "download directory", each "USB
9 * flush storage", or "mounted zip archive" etc. 9 * flush storage", or "mounted zip archive" etc.
10 * 10 *
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 }); 194 });
195 }; 195 };
196 196
197 /** 197 /**
198 * The order of the volume list based on root type. 198 * The order of the volume list based on root type.
199 * @type {Array.<string>} 199 * @type {Array.<string>}
200 * @const 200 * @const
201 * @private 201 * @private
202 */ 202 */
203 volumeManagerUtil.volumeListOrder_ = [ 203 volumeManagerUtil.volumeListOrder_ = [
204 RootType.DRIVE, RootType.DOWNLOADS, RootType.ARCHIVE, RootType.REMOVABLE 204 RootType.DRIVE,
205 RootType.DOWNLOADS,
206 RootType.ARCHIVE,
207 RootType.REMOVABLE,
208 RootType.PRIVET
mtomasz 2014/01/08 09:35:24 How about renaming to CLOUD? Privet sounds like a
Noam Samuel 2014/01/09 01:00:10 Done.
205 ]; 209 ];
206 210
207 /** 211 /**
208 * Compares mount paths to sort the volume list order. 212 * Compares mount paths to sort the volume list order.
209 * @param {string} mountPath1 The mount path for the first volume. 213 * @param {string} mountPath1 The mount path for the first volume.
210 * @param {string} mountPath2 The mount path for the second volume. 214 * @param {string} mountPath2 The mount path for the second volume.
211 * @return {number} 0 if mountPath1 and mountPath2 are same, -1 if VolumeInfo 215 * @return {number} 0 if mountPath1 and mountPath2 are same, -1 if VolumeInfo
212 * mounted at mountPath1 should be listed before the one mounted at 216 * mounted at mountPath1 should be listed before the one mounted at
213 * mountPath2, otherwise 1. 217 * mountPath2, otherwise 1.
214 */ 218 */
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 switch (volumeInfo.volumeType) { 696 switch (volumeInfo.volumeType) {
693 case util.VolumeType.DOWNLOADS: 697 case util.VolumeType.DOWNLOADS:
694 rootType = RootType.DOWNLOADS; 698 rootType = RootType.DOWNLOADS;
695 break; 699 break;
696 case util.VolumeType.REMOVABLE: 700 case util.VolumeType.REMOVABLE:
697 rootType = RootType.REMOVABLE; 701 rootType = RootType.REMOVABLE;
698 break; 702 break;
699 case util.VolumeType.ARCHIVE: 703 case util.VolumeType.ARCHIVE:
700 rootType = RootType.ARCHIVE; 704 rootType = RootType.ARCHIVE;
701 break; 705 break;
706 case util.VolumeType.PRIVET:
707 rootType = RootType.PRIVET;
708 break;
702 default: 709 default:
703 throw new Error('Invalid volume type: ' + volumeInfo.volumeType); 710 throw new Error('Invalid volume type: ' + volumeInfo.volumeType);
704 } 711 }
705 isReadOnly = volumeInfo.isReadOnly; 712 isReadOnly = volumeInfo.isReadOnly;
706 } 713 }
707 var isRootEntry = (entry.fullPath.substr(0, rootPath.length) || '/') === 714 var isRootEntry = (entry.fullPath.substr(0, rootPath.length) || '/') ===
708 entry.fullPath; 715 entry.fullPath;
709 716
710 return new EntryLocation(volumeInfo, rootType, isRootEntry, isReadOnly); 717 return new EntryLocation(volumeInfo, rootType, isRootEntry, isReadOnly);
711 }; 718 };
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 this.isDriveBased; 851 this.isDriveBased;
845 852
846 /** 853 /**
847 * Whether the entry is read only or not. 854 * Whether the entry is read only or not.
848 * @type {boolean} 855 * @type {boolean}
849 */ 856 */
850 this.isReadOnly = isReadOnly; 857 this.isReadOnly = isReadOnly;
851 858
852 Object.freeze(this); 859 Object.freeze(this);
853 } 860 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698