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

Unified Diff: sandbox/linux/syscall_broker/broker_host.cc

Issue 825353003: Revert of Remove deprecated methods from Pickle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « sandbox/linux/syscall_broker/broker_client.cc ('k') | skia/ext/skia_utils_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/syscall_broker/broker_host.cc
diff --git a/sandbox/linux/syscall_broker/broker_host.cc b/sandbox/linux/syscall_broker/broker_host.cc
index ca55f211598c5fbbd7d9e87fcfd54561c0b9b544..7ebc7850a0f4da1e4fc781db9441bf6b6060d0a7 100644
--- a/sandbox/linux/syscall_broker/broker_host.cc
+++ b/sandbox/linux/syscall_broker/broker_host.cc
@@ -110,18 +110,21 @@
}
}
-// Handle a |command_type| request contained in |iter| and send the reply
+// Handle a |command_type| request contained in |read_pickle| and send the reply
// on |reply_ipc|.
// Currently COMMAND_OPEN and COMMAND_ACCESS are supported.
bool HandleRemoteCommand(const BrokerPolicy& policy,
IPCCommand command_type,
int reply_ipc,
+ const Pickle& read_pickle,
PickleIterator iter) {
// Currently all commands have two arguments: filename and flags.
std::string requested_filename;
int flags = 0;
- if (!iter.ReadString(&requested_filename) || !iter.ReadInt(&flags))
+ if (!read_pickle.ReadString(&iter, &requested_filename) ||
+ !read_pickle.ReadInt(&iter, &flags)) {
return false;
+ }
Pickle write_pickle;
std::vector<int> opened_files;
@@ -197,7 +200,7 @@
Pickle pickle(buf, msg_len);
PickleIterator iter(pickle);
int command_type;
- if (iter.ReadInt(&command_type)) {
+ if (pickle.ReadInt(&iter, &command_type)) {
bool command_handled = false;
// Go through all the possible IPC messages.
switch (command_type) {
@@ -206,7 +209,7 @@
// We reply on the file descriptor sent to us via the IPC channel.
command_handled = HandleRemoteCommand(
broker_policy_, static_cast<IPCCommand>(command_type),
- temporary_ipc.get(), iter);
+ temporary_ipc.get(), pickle, iter);
break;
default:
NOTREACHED();
« no previous file with comments | « sandbox/linux/syscall_broker/broker_client.cc ('k') | skia/ext/skia_utils_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698