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 #include "chrome/browser/chromeos/file_manager/volume_manager.h" | 5 #include "chrome/browser/chromeos/file_manager/volume_manager.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 std::string GetMountPointNameForMediaStorage( | 232 std::string GetMountPointNameForMediaStorage( |
233 const storage_monitor::StorageInfo& info) { | 233 const storage_monitor::StorageInfo& info) { |
234 std::string name(kFileManagerMTPMountNamePrefix); | 234 std::string name(kFileManagerMTPMountNamePrefix); |
235 name += info.device_id(); | 235 name += info.device_id(); |
236 return name; | 236 return name; |
237 } | 237 } |
238 | 238 |
239 } // namespace | 239 } // namespace |
240 | 240 |
241 VolumeInfo::VolumeInfo() | 241 VolumeInfo::VolumeInfo() |
242 : file_system_id(0), | 242 : type(VOLUME_TYPE_GOOGLE_DRIVE), |
243 type(VOLUME_TYPE_GOOGLE_DRIVE), | |
244 device_type(chromeos::DEVICE_TYPE_UNKNOWN), | 243 device_type(chromeos::DEVICE_TYPE_UNKNOWN), |
245 mount_condition(chromeos::disks::MOUNT_CONDITION_NONE), | 244 mount_condition(chromeos::disks::MOUNT_CONDITION_NONE), |
246 is_parent(false), | 245 is_parent(false), |
247 is_read_only(false) {} | 246 is_read_only(false) { |
| 247 } |
248 | 248 |
249 VolumeInfo::~VolumeInfo() { | 249 VolumeInfo::~VolumeInfo() { |
250 } | 250 } |
251 | 251 |
252 VolumeManager::VolumeManager( | 252 VolumeManager::VolumeManager( |
253 Profile* profile, | 253 Profile* profile, |
254 drive::DriveIntegrationService* drive_integration_service, | 254 drive::DriveIntegrationService* drive_integration_service, |
255 chromeos::PowerManagerClient* power_manager_client, | 255 chromeos::PowerManagerClient* power_manager_client, |
256 chromeos::disks::DiskMountManager* disk_mount_manager, | 256 chromeos::disks::DiskMountManager* disk_mount_manager, |
257 chromeos::file_system_provider::Service* file_system_provider_service) | 257 chromeos::file_system_provider::Service* file_system_provider_service) |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 return; | 842 return; |
843 if (error_code == chromeos::MOUNT_ERROR_NONE) | 843 if (error_code == chromeos::MOUNT_ERROR_NONE) |
844 mounted_volumes_.erase(volume_info.volume_id); | 844 mounted_volumes_.erase(volume_info.volume_id); |
845 | 845 |
846 FOR_EACH_OBSERVER(VolumeManagerObserver, | 846 FOR_EACH_OBSERVER(VolumeManagerObserver, |
847 observers_, | 847 observers_, |
848 OnVolumeUnmounted(error_code, volume_info)); | 848 OnVolumeUnmounted(error_code, volume_info)); |
849 } | 849 } |
850 | 850 |
851 } // namespace file_manager | 851 } // namespace file_manager |
OLD | NEW |