Index: chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc |
diff --git a/chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc b/chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc |
index fffd1ac0fb200439a8bb903fc65b85a0498830ed..3d7fd423688ddbdcc07fa89df1ada1072e419dfb 100644 |
--- a/chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc |
+++ b/chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc |
@@ -151,10 +151,25 @@ bool ImageWriterPrivateDestroyPartitionsFunction::RunImpl() { |
image_writer_api::DestroyPartitions::Params::Create(*args_)); |
EXTENSION_FUNCTION_VALIDATE(params.get()); |
- SendResponse(true); |
+ image_writer::OperationManager::Get(GetProfile())->DestroyPartitions( |
+ extension_id(), |
+ params->storage_unit_id, |
+ base::Bind( |
+ &ImageWriterPrivateDestroyPartitionsFunction::OnDestroyComplete, |
+ this)); |
return true; |
} |
+void ImageWriterPrivateDestroyPartitionsFunction::OnDestroyComplete( |
+ bool success, |
+ const std::string& error) { |
+ if (!success) { |
+ error_ = error; |
+ } |
+ |
+ SendResponse(success); |
+} |
+ |
ImageWriterPrivateListRemovableStorageDevicesFunction:: |
ImageWriterPrivateListRemovableStorageDevicesFunction() { |
} |