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

Unified Diff: ppapi/proxy/serialized_flash_menu.cc

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 | « ppapi/proxy/serialized_flash_menu.h ('k') | ppapi/proxy/serialized_var.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/serialized_flash_menu.cc
diff --git a/ppapi/proxy/serialized_flash_menu.cc b/ppapi/proxy/serialized_flash_menu.cc
index c29f9c13b1556652da023af6bdf4917a77bf39a0..2784485cf61f021ad2292a869742b777afe65819 100644
--- a/ppapi/proxy/serialized_flash_menu.cc
+++ b/ppapi/proxy/serialized_flash_menu.cc
@@ -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.
@@ -19,7 +19,7 @@ const int kMaxMenuDepth = 2;
bool CheckMenu(int depth, const PP_Flash_Menu* menu);
void FreeMenu(const PP_Flash_Menu* menu);
void WriteMenu(IPC::Message* m, const PP_Flash_Menu* menu);
-PP_Flash_Menu* ReadMenu(int depth, const IPC::Message* m, void** iter);
+PP_Flash_Menu* ReadMenu(int depth, const IPC::Message* m, PickleIterator* iter);
bool CheckMenuItem(int depth, const PP_Flash_MenuItem* item) {
if (item->type == PP_FLASH_MENUITEM_TYPE_SUBMENU)
@@ -77,7 +77,7 @@ void FreeMenu(const PP_Flash_Menu* menu) {
bool ReadMenuItem(int depth,
const IPC::Message* m,
- void** iter,
+ PickleIterator* iter,
PP_Flash_MenuItem* menu_item) {
uint32_t type;
if (!m->ReadUInt32(iter, &type))
@@ -105,7 +105,9 @@ bool ReadMenuItem(int depth,
return true;
}
-PP_Flash_Menu* ReadMenu(int depth, const IPC::Message* m, void** iter) {
+PP_Flash_Menu* ReadMenu(int depth,
+ const IPC::Message* m,
+ PickleIterator* iter) {
if (depth > kMaxMenuDepth)
return NULL;
++depth;
@@ -158,7 +160,8 @@ void SerializedFlashMenu::WriteToMessage(IPC::Message* m) const {
WriteMenu(m, pp_menu_);
}
-bool SerializedFlashMenu::ReadFromMessage(const IPC::Message* m, void** iter) {
+bool SerializedFlashMenu::ReadFromMessage(const IPC::Message* m,
+ PickleIterator* iter) {
DCHECK(!pp_menu_);
pp_menu_ = ReadMenu(0, m, iter);
if (!pp_menu_)
« no previous file with comments | « ppapi/proxy/serialized_flash_menu.h ('k') | ppapi/proxy/serialized_var.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698