Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Unified Diff: content/browser/blob_storage/chrome_blob_storage_context.h

Issue 2960023002: Remove SupportsUserData from ResourceRequestBodyImpl. (Closed)
Patch Set: .... Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698