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

Unified Diff: ipc/ipc_message_utils_impl.h

Issue 9447084: Refactor Pickle Read methods to use higher performance PickleIterator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile (racing with incoming CLs) Created 8 years, 9 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 | « ipc/ipc_message_utils.cc ('k') | ipc/ipc_send_fds_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_utils_impl.h
diff --git a/ipc/ipc_message_utils_impl.h b/ipc/ipc_message_utils_impl.h
index f078b2a0b669699429279801132e85dee8d09e6f..0931e30216b969c65325217e94bffe78f3b10779 100644
--- a/ipc/ipc_message_utils_impl.h
+++ b/ipc/ipc_message_utils_impl.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -18,7 +18,7 @@ void MessageSchema<ParamType>::Write(Message* msg, const RefParam& p) {
template <class ParamType>
bool MessageSchema<ParamType>::Read(const Message* msg, Param* p) {
- void* iter = NULL;
+ PickleIterator iter(*msg);
if (ReadParam(msg, &iter, p))
return true;
NOTREACHED() << "Error deserializing message " << msg->type();
@@ -35,14 +35,14 @@ void SyncMessageSchema<SendParamType, ReplyParamType>::Write(
template <class SendParamType, class ReplyParamType>
bool SyncMessageSchema<SendParamType, ReplyParamType>::ReadSendParam(
const Message* msg, SendParam* p) {
- void* iter = SyncMessage::GetDataIterator(msg);
+ PickleIterator iter = SyncMessage::GetDataIterator(msg);
return ReadParam(msg, &iter, p);
}
template <class SendParamType, class ReplyParamType>
bool SyncMessageSchema<SendParamType, ReplyParamType>::ReadReplyParam(
const Message* msg, typename TupleTypes<ReplyParam>::ValueTuple* p) {
- void* iter = SyncMessage::GetDataIterator(msg);
+ PickleIterator iter = SyncMessage::GetDataIterator(msg);
return ReadParam(msg, &iter, p);
}
« no previous file with comments | « ipc/ipc_message_utils.cc ('k') | ipc/ipc_send_fds_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698