OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 namespace content { | 34 namespace content { |
35 class BrowserContext; | 35 class BrowserContext; |
36 } // namespace content | 36 } // namespace content |
37 | 37 |
38 namespace file_manager { | 38 namespace file_manager { |
39 | 39 |
40 class MountedDiskMonitor; | 40 class MountedDiskMonitor; |
41 class VolumeManagerObserver; | 41 class VolumeManagerObserver; |
42 | 42 |
43 // This manager manages "Drive" and "Downloads" in addition to disks managed | 43 // Identifiers for volume types managed by Chrome OS file manager. |
44 // by DiskMountManager. | |
45 enum VolumeType { | 44 enum VolumeType { |
46 VOLUME_TYPE_GOOGLE_DRIVE, | 45 VOLUME_TYPE_TESTING = -1, // Used only in tests. |
| 46 VOLUME_TYPE_GOOGLE_DRIVE = 0, |
47 VOLUME_TYPE_DOWNLOADS_DIRECTORY, | 47 VOLUME_TYPE_DOWNLOADS_DIRECTORY, |
48 VOLUME_TYPE_REMOVABLE_DISK_PARTITION, | 48 VOLUME_TYPE_REMOVABLE_DISK_PARTITION, |
49 VOLUME_TYPE_MOUNTED_ARCHIVE_FILE, | 49 VOLUME_TYPE_MOUNTED_ARCHIVE_FILE, |
50 VOLUME_TYPE_CLOUD_DEVICE, | 50 VOLUME_TYPE_CLOUD_DEVICE, |
51 VOLUME_TYPE_PROVIDED, // File system provided by the FileSystemProvider API. | 51 VOLUME_TYPE_PROVIDED, // File system provided by the FileSystemProvider API. |
52 VOLUME_TYPE_MTP, | 52 VOLUME_TYPE_MTP, |
53 VOLUME_TYPE_TESTING | 53 // The enum values must be kept in sync with FileManagerVolumeType in |
| 54 // tools/metrics/histograms/histograms.xml. Since enums for histograms are |
| 55 // append-only (for keeping the number consistent across versions), new values |
| 56 // for this enum also has to be always appended at the end (i.e., here). |
| 57 NUM_VOLUME_TYPE, |
54 }; | 58 }; |
55 | 59 |
56 struct VolumeInfo { | 60 struct VolumeInfo { |
57 VolumeInfo(); | 61 VolumeInfo(); |
58 ~VolumeInfo(); | 62 ~VolumeInfo(); |
59 | 63 |
60 // The ID for provided file system. If other type, then equal to zero. | 64 // The ID for provided file system. If other type, then equal to zero. |
61 int file_system_id; | 65 int file_system_id; |
62 | 66 |
63 // The ID of the volume. | 67 // The ID of the volume. |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 | 219 |
216 // Note: This should remain the last member so it'll be destroyed and | 220 // Note: This should remain the last member so it'll be destroyed and |
217 // invalidate its weak pointers before any other members are destroyed. | 221 // invalidate its weak pointers before any other members are destroyed. |
218 base::WeakPtrFactory<VolumeManager> weak_ptr_factory_; | 222 base::WeakPtrFactory<VolumeManager> weak_ptr_factory_; |
219 DISALLOW_COPY_AND_ASSIGN(VolumeManager); | 223 DISALLOW_COPY_AND_ASSIGN(VolumeManager); |
220 }; | 224 }; |
221 | 225 |
222 } // namespace file_manager | 226 } // namespace file_manager |
223 | 227 |
224 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_H_ | 228 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_H_ |
OLD | NEW |