| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 const storage_monitor::StorageInfo& info) OVERRIDE; | 204 const storage_monitor::StorageInfo& info) OVERRIDE; |
| 205 | 205 |
| 206 SnapshotManager* snapshot_manager() { return snapshot_manager_.get(); } | 206 SnapshotManager* snapshot_manager() { return snapshot_manager_.get(); } |
| 207 | 207 |
| 208 private: | 208 private: |
| 209 void OnDiskMountManagerRefreshed(bool success); | 209 void OnDiskMountManagerRefreshed(bool success); |
| 210 void OnStorageMonitorInitialized(); | 210 void OnStorageMonitorInitialized(); |
| 211 void OnPrivetVolumesAvailable( | 211 void OnPrivetVolumesAvailable( |
| 212 const local_discovery::PrivetVolumeLister::VolumeList& volumes); | 212 const local_discovery::PrivetVolumeLister::VolumeList& volumes); |
| 213 void DoMountEvent(chromeos::MountError error_code, | 213 void DoMountEvent(chromeos::MountError error_code, |
| 214 const VolumeInfo& volume_info, | 214 const VolumeInfo& volume_info); |
| 215 bool is_remounting); | |
| 216 void DoUnmountEvent(chromeos::MountError error_code, | 215 void DoUnmountEvent(chromeos::MountError error_code, |
| 217 const VolumeInfo& volume_info); | 216 const VolumeInfo& volume_info); |
| 218 | 217 |
| 219 Profile* profile_; | 218 Profile* profile_; |
| 220 drive::DriveIntegrationService* drive_integration_service_; // Not owned. | 219 drive::DriveIntegrationService* drive_integration_service_; // Not owned. |
| 221 chromeos::disks::DiskMountManager* disk_mount_manager_; // Not owned. | 220 chromeos::disks::DiskMountManager* disk_mount_manager_; // Not owned. |
| 222 scoped_ptr<MountedDiskMonitor> mounted_disk_monitor_; | |
| 223 PrefChangeRegistrar pref_change_registrar_; | 221 PrefChangeRegistrar pref_change_registrar_; |
| 224 ObserverList<VolumeManagerObserver> observers_; | 222 ObserverList<VolumeManagerObserver> observers_; |
| 225 scoped_ptr<local_discovery::PrivetVolumeLister> privet_volume_lister_; | 223 scoped_ptr<local_discovery::PrivetVolumeLister> privet_volume_lister_; |
| 226 chromeos::file_system_provider::Service* | 224 chromeos::file_system_provider::Service* |
| 227 file_system_provider_service_; // Not owned by this class. | 225 file_system_provider_service_; // Not owned by this class. |
| 228 std::map<std::string, VolumeInfo> mounted_volumes_; | 226 std::map<std::string, VolumeInfo> mounted_volumes_; |
| 229 scoped_ptr<SnapshotManager> snapshot_manager_; | 227 scoped_ptr<SnapshotManager> snapshot_manager_; |
| 230 | 228 |
| 231 // Note: This should remain the last member so it'll be destroyed and | 229 // Note: This should remain the last member so it'll be destroyed and |
| 232 // invalidate its weak pointers before any other members are destroyed. | 230 // invalidate its weak pointers before any other members are destroyed. |
| 233 base::WeakPtrFactory<VolumeManager> weak_ptr_factory_; | 231 base::WeakPtrFactory<VolumeManager> weak_ptr_factory_; |
| 234 DISALLOW_COPY_AND_ASSIGN(VolumeManager); | 232 DISALLOW_COPY_AND_ASSIGN(VolumeManager); |
| 235 }; | 233 }; |
| 236 | 234 |
| 237 } // namespace file_manager | 235 } // namespace file_manager |
| 238 | 236 |
| 239 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_H_ | 237 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_H_ |
| OLD | NEW |