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

Unified Diff: chrome/common/extensions/user_script.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/user_script.h ('k') | chrome/common/extensions/user_script_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/user_script.cc
diff --git a/chrome/common/extensions/user_script.cc b/chrome/common/extensions/user_script.cc
index d60b421c40602b82194a7062529a4fa32edc64a7..8fffaa4d032d089e3d49f170b8d9d5c457af293d 100644
--- a/chrome/common/extensions/user_script.cc
+++ b/chrome/common/extensions/user_script.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.
@@ -89,7 +89,7 @@ void UserScript::File::Pickle(::Pickle* pickle) const {
// Do not write content. It will be serialized by other means.
}
-void UserScript::File::Unpickle(const ::Pickle& pickle, void** iter) {
+void UserScript::File::Unpickle(const ::Pickle& pickle, PickleIterator* iter) {
// Read the url from the pickle.
std::string url;
CHECK(pickle.ReadString(iter, &url));
@@ -140,7 +140,7 @@ void UserScript::PickleScripts(::Pickle* pickle,
}
}
-void UserScript::Unpickle(const ::Pickle& pickle, void** iter) {
+void UserScript::Unpickle(const ::Pickle& pickle, PickleIterator* iter) {
// Read the run location.
int run_location = 0;
CHECK(pickle.ReadInt(iter, &run_location));
@@ -160,7 +160,7 @@ void UserScript::Unpickle(const ::Pickle& pickle, void** iter) {
UnpickleScripts(pickle, iter, &css_scripts_);
}
-void UserScript::UnpickleGlobs(const ::Pickle& pickle, void** iter,
+void UserScript::UnpickleGlobs(const ::Pickle& pickle, PickleIterator* iter,
std::vector<std::string>* globs) {
size_t num_globs = 0;
CHECK(pickle.ReadSize(iter, &num_globs));
@@ -172,7 +172,8 @@ void UserScript::UnpickleGlobs(const ::Pickle& pickle, void** iter,
}
}
-void UserScript::UnpickleURLPatternSet(const ::Pickle& pickle, void** iter,
+void UserScript::UnpickleURLPatternSet(const ::Pickle& pickle,
+ PickleIterator* iter,
URLPatternSet* pattern_list) {
size_t num_patterns = 0;
CHECK(pickle.ReadSize(iter, &num_patterns));
@@ -199,7 +200,7 @@ void UserScript::UnpickleURLPatternSet(const ::Pickle& pickle, void** iter,
}
}
-void UserScript::UnpickleScripts(const ::Pickle& pickle, void** iter,
+void UserScript::UnpickleScripts(const ::Pickle& pickle, PickleIterator* iter,
FileList* scripts) {
size_t num_files = 0;
CHECK(pickle.ReadSize(iter, &num_files));
« no previous file with comments | « chrome/common/extensions/user_script.h ('k') | chrome/common/extensions/user_script_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698