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/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 std::string VolumeTypeToString(VolumeType type) { | 92 std::string VolumeTypeToString(VolumeType type) { |
93 switch (type) { | 93 switch (type) { |
94 case VOLUME_TYPE_GOOGLE_DRIVE: | 94 case VOLUME_TYPE_GOOGLE_DRIVE: |
95 return "drive"; | 95 return "drive"; |
96 case VOLUME_TYPE_DOWNLOADS_DIRECTORY: | 96 case VOLUME_TYPE_DOWNLOADS_DIRECTORY: |
97 return "downloads"; | 97 return "downloads"; |
98 case VOLUME_TYPE_REMOVABLE_DISK_PARTITION: | 98 case VOLUME_TYPE_REMOVABLE_DISK_PARTITION: |
99 return "removable"; | 99 return "removable"; |
100 case VOLUME_TYPE_MOUNTED_ARCHIVE_FILE: | 100 case VOLUME_TYPE_MOUNTED_ARCHIVE_FILE: |
101 return "archive"; | 101 return "archive"; |
102 case VOLUME_TYPE_CLOUD_DEVICE: | |
103 return "cloud_device"; | |
104 case VOLUME_TYPE_PROVIDED: | 102 case VOLUME_TYPE_PROVIDED: |
105 return "provided"; | 103 return "provided"; |
106 case VOLUME_TYPE_MTP: | 104 case VOLUME_TYPE_MTP: |
107 return "mtp"; | 105 return "mtp"; |
108 case VOLUME_TYPE_TESTING: | 106 case VOLUME_TYPE_TESTING: |
109 return "testing"; | 107 return "testing"; |
110 case NUM_VOLUME_TYPE: | 108 case NUM_VOLUME_TYPE: |
111 break; | 109 break; |
112 } | 110 } |
113 NOTREACHED(); | 111 NOTREACHED(); |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 if (mounted_volumes_.find(volume->volume_id()) == mounted_volumes_.end()) | 825 if (mounted_volumes_.find(volume->volume_id()) == mounted_volumes_.end()) |
828 return; | 826 return; |
829 if (error_code == chromeos::MOUNT_ERROR_NONE) | 827 if (error_code == chromeos::MOUNT_ERROR_NONE) |
830 mounted_volumes_.erase(volume->volume_id()); | 828 mounted_volumes_.erase(volume->volume_id()); |
831 | 829 |
832 FOR_EACH_OBSERVER(VolumeManagerObserver, observers_, | 830 FOR_EACH_OBSERVER(VolumeManagerObserver, observers_, |
833 OnVolumeUnmounted(error_code, *volume.get())); | 831 OnVolumeUnmounted(error_code, *volume.get())); |
834 } | 832 } |
835 | 833 |
836 } // namespace file_manager | 834 } // namespace file_manager |
OLD | NEW |