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

Unified Diff: content/child/threaded_data_provider.cc

Issue 1103813002: Make WebURLLoader capable of retaining received buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/child/threaded_data_provider.cc
diff --git a/content/child/threaded_data_provider.cc b/content/child/threaded_data_provider.cc
index eea420a44a17aef56c0b73268fc665ef2cf41617..994f2e1d19bfda774ced4d082d219e1eb354cb56 100644
--- a/content/child/threaded_data_provider.cc
+++ b/content/child/threaded_data_provider.cc
@@ -7,6 +7,7 @@
#include "components/scheduler/child/webthread_impl_for_worker_scheduler.h"
#include "content/child/child_process.h"
#include "content/child/child_thread_impl.h"
+#include "content/child/ref_counted_shared_memory.h"
#include "content/child/resource_dispatcher.h"
#include "content/child/thread_safe_sender.h"
#include "content/common/resource_messages.h"
@@ -120,7 +121,7 @@ void DataProviderMessageFilter::OnReceivedData(int request_id,
ThreadedDataProvider::ThreadedDataProvider(
int request_id,
blink::WebThreadedDataReceiver* threaded_data_receiver,
- linked_ptr<base::SharedMemory> shm_buffer,
+ scoped_refptr<RefCountedSharedMemory> shm_buffer,
int shm_size,
scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner)
: request_id_(request_id),
@@ -275,7 +276,7 @@ void ThreadedDataProvider::OnReceivedDataOnBackgroundThread(
DCHECK(shm_buffer_ != NULL);
CHECK_GE(shm_size_, data_offset + data_length);
- const char* data_ptr = static_cast<char*>(shm_buffer_->memory());
+ const char* data_ptr = static_cast<char*>(shm_buffer_->memory().memory());
CHECK(data_ptr);
CHECK(data_ptr + data_offset);

Powered by Google App Engine
This is Rietveld 408576698