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

Unified Diff: content/browser/renderer_host/render_sandbox_host_linux.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 | « content/browser/download/base_file.cc ('k') | content/browser/renderer_host/render_view_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_sandbox_host_linux.cc
diff --git a/content/browser/renderer_host/render_sandbox_host_linux.cc b/content/browser/renderer_host/render_sandbox_host_linux.cc
index 9fb2ad304417eec0cb9cabf3b2e5994c3fd48c1b..ea40db23ef1113902fec87d152f3dea96edbb8f4 100644
--- a/content/browser/renderer_host/render_sandbox_host_linux.cc
+++ b/content/browser/renderer_host/render_sandbox_host_linux.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.
@@ -124,7 +124,7 @@ class SandboxIPCProcess {
return;
Pickle pickle(buf, len);
- void* iter = NULL;
+ PickleIterator iter(pickle);
int kind;
if (!pickle.ReadInt(&iter, &kind))
@@ -155,7 +155,7 @@ class SandboxIPCProcess {
}
}
- void HandleFontMatchRequest(int fd, const Pickle& pickle, void* iter,
+ void HandleFontMatchRequest(int fd, const Pickle& pickle, PickleIterator iter,
std::vector<int>& fds) {
bool filefaceid_valid;
uint32_t filefaceid;
@@ -207,7 +207,7 @@ class SandboxIPCProcess {
SendRendererReply(fds, reply, -1);
}
- void HandleFontOpenRequest(int fd, const Pickle& pickle, void* iter,
+ void HandleFontOpenRequest(int fd, const Pickle& pickle, PickleIterator iter,
std::vector<int>& fds) {
uint32_t filefaceid;
if (!pickle.ReadUInt32(&iter, &filefaceid))
@@ -227,7 +227,8 @@ class SandboxIPCProcess {
close(result_fd);
}
- void HandleGetFontFamilyForChars(int fd, const Pickle& pickle, void* iter,
+ void HandleGetFontFamilyForChars(int fd, const Pickle& pickle,
+ PickleIterator iter,
std::vector<int>& fds) {
// The other side of this call is
// chrome/renderer/renderer_sandbox_support_linux.cc
@@ -278,7 +279,8 @@ class SandboxIPCProcess {
SendRendererReply(fds, reply, -1);
}
- void HandleGetStyleForStrike(int fd, const Pickle& pickle, void* iter,
+ void HandleGetStyleForStrike(int fd, const Pickle& pickle,
+ PickleIterator iter,
std::vector<int>& fds) {
std::string family;
int sizeAndStyle;
@@ -303,7 +305,7 @@ class SandboxIPCProcess {
SendRendererReply(fds, reply, -1);
}
- void HandleLocaltime(int fd, const Pickle& pickle, void* iter,
+ void HandleLocaltime(int fd, const Pickle& pickle, PickleIterator iter,
std::vector<int>& fds) {
// The other side of this call is in zygote_main_linux.cc
@@ -333,7 +335,8 @@ class SandboxIPCProcess {
SendRendererReply(fds, reply, -1);
}
- void HandleGetChildWithInode(int fd, const Pickle& pickle, void* iter,
+ void HandleGetChildWithInode(int fd, const Pickle& pickle,
+ PickleIterator iter,
std::vector<int>& fds) {
// The other side of this call is in zygote_main_linux.cc
if (sandbox_cmd_.empty()) {
@@ -365,7 +368,8 @@ class SandboxIPCProcess {
SendRendererReply(fds, reply, -1);
}
- void HandleMakeSharedMemorySegment(int fd, const Pickle& pickle, void* iter,
+ void HandleMakeSharedMemorySegment(int fd, const Pickle& pickle,
+ PickleIterator iter,
std::vector<int>& fds) {
base::SharedMemoryCreateOptions options;
if (!pickle.ReadUInt32(&iter, &options.size))
@@ -380,7 +384,8 @@ class SandboxIPCProcess {
SendRendererReply(fds, reply, shm_fd);
}
- void HandleMatchWithFallback(int fd, const Pickle& pickle, void* iter,
+ void HandleMatchWithFallback(int fd, const Pickle& pickle,
+ PickleIterator iter,
std::vector<int>& fds) {
// Unlike the other calls, for which we are an indirection in front of
// WebKit or Skia, this call is always made via this sandbox helper
« no previous file with comments | « content/browser/download/base_file.cc ('k') | content/browser/renderer_host/render_view_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698