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

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

Issue 2960023002: Remove SupportsUserData from ResourceRequestBodyImpl. (Closed)
Patch Set: Merge, response to comment 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
« no previous file with comments | « content/browser/blob_storage/chrome_blob_storage_context.h ('k') | content/browser/loader/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/blob_storage/chrome_blob_storage_context.cc
diff --git a/content/browser/blob_storage/chrome_blob_storage_context.cc b/content/browser/blob_storage/chrome_blob_storage_context.cc
index 104283fb49ca4181593a583cd2cff077101db691..6dfe51cf6845faf3c5eaccf15841d78ad556dffd 100644
--- a/content/browser/blob_storage/chrome_blob_storage_context.cc
+++ b/content/browser/blob_storage/chrome_blob_storage_context.cc
@@ -15,6 +15,7 @@
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/single_thread_task_runner.h"
+#include "base/supports_user_data.h"
#include "base/task_runner.h"
#include "base/task_scheduler/post_task.h"
#include "content/browser/resource_context_impl.h"
@@ -24,7 +25,6 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_features.h"
#include "storage/browser/blob/blob_data_builder.h"
-#include "storage/browser/blob/blob_data_handle.h"
#include "storage/browser/blob/blob_memory_controller.h"
#include "storage/browser/blob/blob_registry_impl.h"
#include "storage/browser/blob/blob_storage_context.h"
@@ -210,8 +210,11 @@ storage::BlobStorageContext* GetBlobStorageContext(
return blob_storage_context->context();
}
-bool AttachRequestBodyBlobDataHandles(ResourceRequestBodyImpl* body,
- ResourceContext* resource_context) {
+bool GetBodyBlobDataHandles(ResourceRequestBodyImpl* body,
+ ResourceContext* resource_context,
+ BlobHandles* blob_handles) {
+ blob_handles->clear();
+
storage::BlobStorageContext* blob_context = GetBlobStorageContext(
GetChromeBlobStorageContextForResourceContext(resource_context));
@@ -224,10 +227,7 @@ bool AttachRequestBodyBlobDataHandles(ResourceRequestBodyImpl* body,
blob_context->GetBlobDataFromUUID(element.blob_uuid());
if (!handle)
return false;
- // Ensure the blob and any attached shareable files survive until
- // upload completion. The |body| takes ownership of |handle|.
- const void* key = handle.get();
- body->SetUserData(key, std::move(handle));
+ blob_handles->push_back(std::move(handle));
}
return true;
}
« no previous file with comments | « content/browser/blob_storage/chrome_blob_storage_context.h ('k') | content/browser/loader/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698