Chromium Code Reviews| Index: content/browser/blob_storage/chrome_blob_storage_context.h |
| diff --git a/content/browser/blob_storage/chrome_blob_storage_context.h b/content/browser/blob_storage/chrome_blob_storage_context.h |
| index bd8b92ef4af4f9e64e16791d9e2c0421aea35594..73d21b8ece049e6e610d905304cfbfd37062cc38 100644 |
| --- a/content/browser/blob_storage/chrome_blob_storage_context.h |
| +++ b/content/browser/blob_storage/chrome_blob_storage_context.h |
| @@ -9,11 +9,13 @@ |
| #include <stdint.h> |
| #include <memory> |
| +#include <vector> |
| #include "base/files/file_path.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/sequenced_task_runner_helpers.h" |
| #include "content/common/content_export.h" |
| +#include "storage/browser/blob/blob_data_handle.h" |
| namespace base { |
| class FilePath; |
| @@ -89,10 +91,14 @@ struct ChromeBlobStorageContextDeleter { |
| storage::BlobStorageContext* GetBlobStorageContext( |
| ChromeBlobStorageContext* blob_storage_context); |
| -// Attaches blob data handles to the ResourceRequestBodyImpl body passed in. |
| -// This is used for POST and PUT requests. |
| -bool AttachRequestBodyBlobDataHandles(ResourceRequestBodyImpl* body, |
| - ResourceContext* resource_context); |
| +using BlobHandles = std::vector<std::unique_ptr<storage::BlobDataHandle>>; |
| + |
| +// returns a vector of BlobDataHandles, that ensure the data isn't cleaned up |
| +// until they're destroyed. Returns nullptr on failure, and an empty vector when |
| +// there are no blobs. This is used for POST and PUT requests. |
| +std::unique_ptr<BlobHandles> GetBodyBlobDataHandles( |
|
dmurph
2017/06/27 21:29:07
Can you have this just return the vector? You can
mmenke
2017/06/27 21:32:22
We need a way to fail. The only reason I used a u
dmurph
2017/06/27 21:35:53
What about providing the 'out' vector in an argume
mmenke
2017/06/27 21:48:44
Works for me, done.
|
| + ResourceRequestBodyImpl* body, |
| + ResourceContext* resource_context); |
| } // namespace content |