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

Unified Diff: chrome/common/extensions/extension_messages.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 | « chrome/common/extensions/extension_messages.h ('k') | chrome/common/extensions/extension_unpacker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_messages.cc
diff --git a/chrome/common/extensions/extension_messages.cc b/chrome/common/extensions/extension_messages.cc
index fd1fa2b2ec2d14ed0991014513cbf33c99f11445..bda807bf4be43809ebc622f1849faa0432b9704e 100644
--- a/chrome/common/extensions/extension_messages.cc
+++ b/chrome/common/extensions/extension_messages.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.
@@ -45,7 +45,7 @@ struct ParamTraits<Extension::Location> {
int val = static_cast<int>(p);
WriteParam(m, val);
}
- static bool Read(const Message* m, void** iter, param_type* p) {
+ static bool Read(const Message* m, PickleIterator* iter, param_type* p) {
int val = 0;
if (!ReadParam(m, iter, &val) ||
val < Extension::INVALID ||
@@ -64,7 +64,7 @@ void ParamTraits<URLPattern>::Write(Message* m, const param_type& p) {
WriteParam(m, p.GetAsString());
}
-bool ParamTraits<URLPattern>::Read(const Message* m, void** iter,
+bool ParamTraits<URLPattern>::Read(const Message* m, PickleIterator* iter,
param_type* p) {
int valid_schemes;
std::string spec;
@@ -91,7 +91,7 @@ void ParamTraits<URLPatternSet>::Write(Message* m, const param_type& p) {
WriteParam(m, p.patterns());
}
-bool ParamTraits<URLPatternSet>::Read(const Message* m, void** iter,
+bool ParamTraits<URLPatternSet>::Read(const Message* m, PickleIterator* iter,
param_type* p) {
std::set<URLPattern> patterns;
if (!ReadParam(m, iter, &patterns))
@@ -113,7 +113,7 @@ void ParamTraits<ExtensionAPIPermission::ID>::Write(
}
bool ParamTraits<ExtensionAPIPermission::ID>::Read(
- const Message* m, void** iter, param_type* p) {
+ const Message* m, PickleIterator* iter, param_type* p) {
int api_id = -2;
if (!ReadParam(m, iter, &api_id))
return false;
@@ -136,7 +136,7 @@ void ParamTraits<ExtensionMsg_Loaded_Params>::Write(Message* m,
}
bool ParamTraits<ExtensionMsg_Loaded_Params>::Read(const Message* m,
- void** iter,
+ PickleIterator* iter,
param_type* p) {
p->manifest.reset(new DictionaryValue());
return ReadParam(m, iter, &p->location) &&
« no previous file with comments | « chrome/common/extensions/extension_messages.h ('k') | chrome/common/extensions/extension_unpacker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698