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

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

Issue 818833004: Remove deprecated methods from Pickle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 7ebc7850a0f4da1e4fc781db9441bf6b6060d0a7..ca55f211598c5fbbd7d9e87fcfd54561c0b9b544 100644
--- a/sandbox/linux/syscall_broker/broker_host.cc
+++ b/sandbox/linux/syscall_broker/broker_host.cc
@@ -110,21 +110,18 @@ void AccessFileForIPC(const BrokerPolicy& policy,
}
}
-// Handle a |command_type| request contained in |read_pickle| and send the reply
+// Handle a |command_type| request contained in |iter| 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 (!read_pickle.ReadString(&iter, &requested_filename) ||
- !read_pickle.ReadInt(&iter, &flags)) {
+ if (!iter.ReadString(&requested_filename) || !iter.ReadInt(&flags))
return false;
- }
Pickle write_pickle;
std::vector<int> opened_files;
@@ -200,7 +197,7 @@ BrokerHost::RequestStatus BrokerHost::HandleRequest() const {
Pickle pickle(buf, msg_len);
PickleIterator iter(pickle);
int command_type;
- if (pickle.ReadInt(&iter, &command_type)) {
+ if (iter.ReadInt(&command_type)) {
bool command_handled = false;
// Go through all the possible IPC messages.
switch (command_type) {
@@ -209,7 +206,7 @@ BrokerHost::RequestStatus BrokerHost::HandleRequest() const {
// 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(), pickle, iter);
+ temporary_ipc.get(), 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