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

Unified Diff: content/browser/loader/resource_dispatcher_host_unittest.cc

Issue 11570038: Remove IPC::MessageIterator. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: . Created 8 years 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 | « no previous file | content/common/indexed_db/indexed_db_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_dispatcher_host_unittest.cc
diff --git a/content/browser/loader/resource_dispatcher_host_unittest.cc b/content/browser/loader/resource_dispatcher_host_unittest.cc
index 3c9d8811ffc3fb59b981d9b58714b69c6ccc9217..75144d89d0b5bcac0e22f3e961f9c9805b55f08b 100644
--- a/content/browser/loader/resource_dispatcher_host_unittest.cc
+++ b/content/browser/loader/resource_dispatcher_host_unittest.cc
@@ -8,6 +8,7 @@
#include "base/file_path.h"
#include "base/memory/scoped_vector.h"
#include "base/message_loop.h"
+#include "base/pickle.h"
#include "base/process_util.h"
#include "base/string_number_conversions.h"
#include "base/string_split.h"
@@ -75,9 +76,11 @@ static int RequestIDForMessage(const IPC::Message& msg) {
case ResourceMsg_ReceivedRedirect::ID:
case ResourceMsg_SetDataBuffer::ID:
case ResourceMsg_DataReceived::ID:
- case ResourceMsg_RequestComplete::ID:
- request_id = IPC::MessageIterator(msg).NextInt();
+ case ResourceMsg_RequestComplete::ID: {
+ bool result = PickleIterator(msg).ReadInt(&request_id);
+ DCHECK(result);
break;
+ }
}
return request_id;
}
@@ -688,7 +691,9 @@ class ResourceDispatcherHostTest : public testing::Test,
void GenerateDataReceivedACK(const IPC::Message& msg) {
EXPECT_EQ(ResourceMsg_DataReceived::ID, msg.type());
- int request_id = IPC::MessageIterator(msg).NextInt();
+ int request_id = -1;
+ bool result = PickleIterator(msg).ReadInt(&request_id);
+ DCHECK(result);
scoped_ptr<IPC::Message> ack(
new ResourceHostMsg_DataReceived_ACK(msg.routing_id(), request_id));
« no previous file with comments | « no previous file | content/common/indexed_db/indexed_db_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698