| 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/extensions/file_manager/private_api_mount.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_mount.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
| 10 #include "chrome/browser/chromeos/drive/file_system_interface.h" | 10 #include "chrome/browser/chromeos/drive/file_system_interface.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 volume_info.mount_path.value(), | 123 volume_info.mount_path.value(), |
| 124 chromeos::UNMOUNT_OPTIONS_NONE, | 124 chromeos::UNMOUNT_OPTIONS_NONE, |
| 125 DiskMountManager::UnmountPathCallback()); | 125 DiskMountManager::UnmountPathCallback()); |
| 126 break; | 126 break; |
| 127 } | 127 } |
| 128 case file_manager::VOLUME_TYPE_PROVIDED: { | 128 case file_manager::VOLUME_TYPE_PROVIDED: { |
| 129 chromeos::file_system_provider::Service* service = | 129 chromeos::file_system_provider::Service* service = |
| 130 chromeos::file_system_provider::Service::Get(GetProfile()); | 130 chromeos::file_system_provider::Service::Get(GetProfile()); |
| 131 DCHECK(service); | 131 DCHECK(service); |
| 132 // TODO(mtomasz): Pass a more detailed error than just a bool. | 132 // TODO(mtomasz): Pass a more detailed error than just a bool. |
| 133 if (!service->RequestUnmount(volume_info.file_system_id)) | 133 if (!service->RequestUnmount(volume_info.extension_id, |
| 134 volume_info.file_system_id)) { |
| 134 return false; | 135 return false; |
| 136 } |
| 135 break; | 137 break; |
| 136 } | 138 } |
| 137 default: | 139 default: |
| 138 // Requested unmounting a device which is not unmountable. | 140 // Requested unmounting a device which is not unmountable. |
| 139 return false; | 141 return false; |
| 140 } | 142 } |
| 141 | 143 |
| 142 SendResponse(true); | 144 SendResponse(true); |
| 143 return true; | 145 return true; |
| 144 } | 146 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 171 result.size()); | 173 result.size()); |
| 172 } | 174 } |
| 173 | 175 |
| 174 results_ = | 176 results_ = |
| 175 file_browser_private::GetVolumeMetadataList::Results::Create(result); | 177 file_browser_private::GetVolumeMetadataList::Results::Create(result); |
| 176 SendResponse(true); | 178 SendResponse(true); |
| 177 return true; | 179 return true; |
| 178 } | 180 } |
| 179 | 181 |
| 180 } // namespace extensions | 182 } // namespace extensions |
| OLD | NEW |