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

Unified Diff: content/common/resource_dispatcher_unittest.cc

Issue 10911297: Modify AsyncResourceHandler to use a single shared memory buffer (in ring (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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/common/resource_dispatcher_unittest.cc
===================================================================
--- content/common/resource_dispatcher_unittest.cc (revision 157294)
+++ content/common/resource_dispatcher_unittest.cc (working copy)
@@ -134,12 +134,11 @@
base::SharedMemoryHandle dup_handle;
EXPECT_TRUE(shared_mem.GiveToProcess(
base::Process::Current().handle(), &dup_handle));
- dispatcher_->OnReceivedData(
- message_queue_[0],
- request_id,
- dup_handle,
- test_page_contents_len,
- test_page_contents_len);
+ dispatcher_->OnSetDataBuffer(message_queue_[0], request_id, dup_handle,
+ test_page_contents_len);
+ dispatcher_->OnReceivedData(message_queue_[0], request_id, 0,
+ test_page_contents_len,
+ test_page_contents_len);
message_queue_.erase(message_queue_.begin());
@@ -260,7 +259,9 @@
&duplicated_handle));
dispatcher_->OnMessageReceived(
- ResourceMsg_DataReceived(0, 0, duplicated_handle, 100, 100));
+ ResourceMsg_SetDataBuffer(0, 0, duplicated_handle, 100));
+ dispatcher_->OnMessageReceived(
+ ResourceMsg_DataReceived(0, 0, 0, 100, 100));
set_defer_loading(false);
}

Powered by Google App Engine
This is Rietveld 408576698