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

Unified Diff: content/browser/zygote_host/zygote_host_impl_linux.cc

Issue 1154283003: Change most uses of Pickle to base::Pickle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
Index: content/browser/zygote_host/zygote_host_impl_linux.cc
diff --git a/content/browser/zygote_host/zygote_host_impl_linux.cc b/content/browser/zygote_host/zygote_host_impl_linux.cc
index 3506207247e02e91284efb188fcccf7fb2900fa3..015acf14264bd02da0af0508fd64b57d14d4d4a2 100644
--- a/content/browser/zygote_host/zygote_host_impl_linux.cc
+++ b/content/browser/zygote_host/zygote_host_impl_linux.cc
@@ -221,7 +221,7 @@ void ZygoteHostImpl::Init(const std::string& sandbox_cmd) {
close(fds[1]);
control_fd_ = fds[0];
- Pickle pickle;
+ base::Pickle pickle;
pickle.WriteInt(kZygoteCommandGetSandboxStatus);
if (!SendMessage(pickle, NULL))
LOG(FATAL) << "Cannot communicate with zygote";
@@ -275,7 +275,7 @@ void ZygoteHostImpl::ZygoteChildDied(pid_t process) {
}
}
-bool ZygoteHostImpl::SendMessage(const Pickle& data,
+bool ZygoteHostImpl::SendMessage(const base::Pickle& data,
const std::vector<int>* fds) {
DCHECK_NE(-1, control_fd_);
CHECK(data.size() <= kZygoteMaxMessageLength)
@@ -314,7 +314,7 @@ pid_t ZygoteHostImpl::ForkRequest(const std::vector<std::string>& argv,
scoped_ptr<FileDescriptorInfo> mapping,
const std::string& process_type) {
DCHECK(init_);
- Pickle pickle;
+ base::Pickle pickle;
int raw_socks[2];
PCHECK(0 == socketpair(AF_UNIX, SOCK_SEQPACKET, 0, raw_socks));
@@ -378,7 +378,7 @@ pid_t ZygoteHostImpl::ForkRequest(const std::vector<std::string>& argv,
my_sock.reset();
// Always send PID back to zygote.
- Pickle pid_pickle;
+ base::Pickle pid_pickle;
pid_pickle.WriteInt(kZygoteCommandForkRealPID);
pid_pickle.WriteInt(real_pid);
if (!SendMessage(pid_pickle, NULL))
@@ -390,8 +390,8 @@ pid_t ZygoteHostImpl::ForkRequest(const std::vector<std::string>& argv,
char buf[kMaxReplyLength];
const ssize_t len = ReadReply(buf, sizeof(buf));
- Pickle reply_pickle(buf, len);
- PickleIterator iter(reply_pickle);
+ base::Pickle reply_pickle(buf, len);
+ base::PickleIterator iter(reply_pickle);
if (len <= 0 || !iter.ReadInt(&pid))
return base::kNullProcessHandle;
@@ -513,7 +513,7 @@ void ZygoteHostImpl::AdjustRendererOOMScore(base::ProcessHandle pid,
void ZygoteHostImpl::EnsureProcessTerminated(pid_t process) {
DCHECK(init_);
- Pickle pickle;
+ base::Pickle pickle;
pickle.WriteInt(kZygoteCommandReap);
pickle.WriteInt(process);
@@ -527,7 +527,7 @@ base::TerminationStatus ZygoteHostImpl::GetTerminationStatus(
bool known_dead,
int* exit_code) {
DCHECK(init_);
- Pickle pickle;
+ base::Pickle pickle;
pickle.WriteInt(kZygoteCommandGetTerminationStatus);
pickle.WriteBool(known_dead);
pickle.WriteInt(handle);
@@ -552,9 +552,9 @@ base::TerminationStatus ZygoteHostImpl::GetTerminationStatus(
} else if (len == 0) {
LOG(WARNING) << "Socket closed prematurely.";
} else {
- Pickle read_pickle(buf, len);
+ base::Pickle read_pickle(buf, len);
int tmp_status, tmp_exit_code;
- PickleIterator iter(read_pickle);
+ base::PickleIterator iter(read_pickle);
if (!iter.ReadInt(&tmp_status) || !iter.ReadInt(&tmp_exit_code)) {
LOG(WARNING)
<< "Error parsing GetTerminationStatus response from zygote.";
« no previous file with comments | « content/browser/web_contents/web_drag_source_mac.mm ('k') | content/child/bluetooth/bluetooth_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698