summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-06-02 21:29:25 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-03 04:30:27 +0000
commitbd4d71128239a38fa844c42e4110458109a8b135 (patch)
tree47ff0ad11b9270fb410d93632fd63a0c78218176 /content
parent6f89d8f965bae07a352ee82abe1fb551f65d65e1 (diff)
downloadchromium_src-bd4d71128239a38fa844c42e4110458109a8b135.zip
chromium_src-bd4d71128239a38fa844c42e4110458109a8b135.tar.gz
chromium_src-bd4d71128239a38fa844c42e4110458109a8b135.tar.bz2
Change most uses of Pickle to base::Pickle
There should be no behavior change. TBR=jschuh (IPC messages) Review URL: https://codereview.chromium.org/1154283003 Cr-Commit-Position: refs/heads/master@{#332552}
Diffstat (limited to 'content')
-rw-r--r--content/browser/android/java/gin_java_bridge_dispatcher_host.cc4
-rw-r--r--content/browser/appcache/appcache_response.cc12
-rw-r--r--content/browser/appcache/appcache_response_unittest.cc9
-rw-r--r--content/browser/appcache/appcache_service_unittest.cc5
-rw-r--r--content/browser/appcache/appcache_url_request_job_unittest.cc9
-rw-r--r--content/browser/browser_plugin/browser_plugin_message_filter.cc2
-rw-r--r--content/browser/download/base_file.cc7
-rw-r--r--content/browser/frame_host/render_frame_host_impl.cc2
-rw-r--r--content/browser/loader/resource_dispatcher_host_impl.cc2
-rw-r--r--content/browser/loader/resource_dispatcher_host_unittest.cc16
-rw-r--r--content/browser/loader/resource_scheduler_filter.cc2
-rw-r--r--content/browser/renderer_host/clipboard_message_filter.cc2
-rw-r--r--content/browser/renderer_host/input/input_router_impl_unittest.cc2
-rw-r--r--content/browser/renderer_host/render_widget_host_unittest.cc2
-rw-r--r--content/browser/renderer_host/render_widget_host_view_aura_unittest.cc2
-rw-r--r--content/browser/renderer_host/sandbox_ipc_linux.cc34
-rw-r--r--content/browser/web_contents/web_contents_view_aura.cc12
-rw-r--r--content/browser/web_contents/web_drag_source_mac.mm2
-rw-r--r--content/browser/zygote_host/zygote_host_impl_linux.cc20
-rw-r--r--content/child/bluetooth/bluetooth_message_filter.cc2
-rw-r--r--content/child/geofencing/geofencing_message_filter.cc2
-rw-r--r--content/child/indexed_db/indexed_db_message_filter.cc2
-rw-r--r--content/child/navigator_connect/navigator_connect_dispatcher.cc2
-rw-r--r--content/child/notifications/notification_dispatcher.cc2
-rw-r--r--content/child/npapi/npruntime_util.cc4
-rw-r--r--content/child/plugin_param_traits.cc4
-rw-r--r--content/child/push_messaging/push_dispatcher.cc2
-rw-r--r--content/child/quota_message_filter.cc2
-rw-r--r--content/child/resource_dispatcher.cc4
-rw-r--r--content/child/service_worker/service_worker_message_filter.cc2
-rw-r--r--content/child/threaded_data_provider.cc2
-rw-r--r--content/common/android/gin_java_bridge_value.cc8
-rw-r--r--content/common/cc_messages.cc37
-rw-r--r--content/common/cc_messages_unittest.cc12
-rw-r--r--content/common/child_process_sandbox_support_impl_linux.cc14
-rw-r--r--content/common/child_process_sandbox_support_impl_shm_linux.cc2
-rw-r--r--content/common/common_param_traits_unittest.cc26
-rw-r--r--content/common/content_param_traits.cc2
-rw-r--r--content/common/cursors/webcursor.cc4
-rw-r--r--content/common/font_config_ipc_linux.cc12
-rw-r--r--content/common/gamepad_param_traits.cc7
-rw-r--r--content/common/indexed_db/indexed_db_param_traits.cc6
-rw-r--r--content/common/input/input_param_traits.cc14
-rw-r--r--content/common/input/input_param_traits_unittest.cc8
-rw-r--r--content/common/mac/attributed_string_coder.mm8
-rw-r--r--content/common/media/media_param_traits.cc4
-rw-r--r--content/common/page_state_serialization.cc6
-rw-r--r--content/common/page_state_serialization_unittest.cc4
-rw-r--r--content/common/resource_messages.cc23
-rw-r--r--content/common/ssl_status_serialization.cc6
-rw-r--r--content/public/common/common_param_traits.cc16
-rw-r--r--content/renderer/browser_plugin/browser_plugin_manager.cc2
-rw-r--r--content/renderer/cache_storage/cache_storage_message_filter.cc2
-rw-r--r--content/renderer/scheduler/resource_dispatch_throttler_unittest.cc6
-rw-r--r--content/renderer/service_worker/embedded_worker_context_message_filter.cc2
-rw-r--r--content/zygote/zygote_linux.cc25
-rw-r--r--content/zygote/zygote_main_linux.cc6
57 files changed, 228 insertions, 210 deletions
diff --git a/content/browser/android/java/gin_java_bridge_dispatcher_host.cc b/content/browser/android/java/gin_java_bridge_dispatcher_host.cc
index fc4c55e..69a08b43 100644
--- a/content/browser/android/java/gin_java_bridge_dispatcher_host.cc
+++ b/content/browser/android/java/gin_java_bridge_dispatcher_host.cc
@@ -325,7 +325,7 @@ base::TaskRunner* GinJavaBridgeDispatcherHost::OverrideTaskRunnerForMessage(
case GinJavaBridgeHostMsg_HasMethod::ID:
case GinJavaBridgeHostMsg_InvokeMethod::ID: {
DCHECK(message.is_sync());
- PickleIterator message_reader =
+ base::PickleIterator message_reader =
IPC::SyncMessage::GetDataIterator(&message);
if (!IPC::ReadParam(&message, &message_reader, &object_id))
return NULL;
@@ -333,7 +333,7 @@ base::TaskRunner* GinJavaBridgeDispatcherHost::OverrideTaskRunnerForMessage(
}
case GinJavaBridgeHostMsg_ObjectWrapperDeleted::ID: {
DCHECK(!message.is_sync());
- PickleIterator message_reader(message);
+ base::PickleIterator message_reader(message);
if (!IPC::ReadParam(&message, &message_reader, &object_id))
return NULL;
break;
diff --git a/content/browser/appcache/appcache_response.cc b/content/browser/appcache/appcache_response.cc
index 0c0f4bf..66ec22e 100644
--- a/content/browser/appcache/appcache_response.cc
+++ b/content/browser/appcache/appcache_response.cc
@@ -29,16 +29,16 @@ enum { kResponseInfoIndex, kResponseContentIndex, kResponseMetadataIndex };
// pickle is transfered to the WrappedPickleIOBuffer object.
class WrappedPickleIOBuffer : public net::WrappedIOBuffer {
public:
- explicit WrappedPickleIOBuffer(const Pickle* pickle) :
- net::WrappedIOBuffer(reinterpret_cast<const char*>(pickle->data())),
- pickle_(pickle) {
+ explicit WrappedPickleIOBuffer(const base::Pickle* pickle)
+ : net::WrappedIOBuffer(reinterpret_cast<const char*>(pickle->data())),
+ pickle_(pickle) {
DCHECK(pickle->data());
}
private:
~WrappedPickleIOBuffer() override {}
- scoped_ptr<const Pickle> pickle_;
+ scoped_ptr<const base::Pickle> pickle_;
};
} // anon namespace
@@ -254,7 +254,7 @@ void AppCacheResponseReader::OnIOComplete(int result) {
reading_metadata_size_ = 0;
} else if (info_buffer_.get()) {
// Deserialize the http info structure, ensuring we got headers.
- Pickle pickle(buffer_->data(), result);
+ base::Pickle pickle(buffer_->data(), result);
scoped_ptr<net::HttpResponseInfo> info(new net::HttpResponseInfo);
bool response_truncated = false;
if (!info->InitFromPickle(pickle, &response_truncated) ||
@@ -336,7 +336,7 @@ void AppCacheResponseWriter::ContinueWriteInfo() {
const bool kSkipTransientHeaders = true;
const bool kTruncated = false;
- Pickle* pickle = new Pickle;
+ base::Pickle* pickle = new base::Pickle;
info_buffer_->http_info->Persist(pickle, kSkipTransientHeaders, kTruncated);
write_amount_ = static_cast<int>(pickle->size());
buffer_ = new WrappedPickleIOBuffer(pickle); // takes ownership of pickle
diff --git a/content/browser/appcache/appcache_response_unittest.cc b/content/browser/appcache/appcache_response_unittest.cc
index 5f91f92..f5eb417 100644
--- a/content/browser/appcache/appcache_response_unittest.cc
+++ b/content/browser/appcache/appcache_response_unittest.cc
@@ -265,21 +265,22 @@ class AppCacheResponseTest : public testing::Test {
}
int GetHttpResponseInfoSize(const net::HttpResponseInfo* info) {
- Pickle pickle;
+ base::Pickle pickle;
return PickleHttpResonseInfo(&pickle, info);
}
bool CompareHttpResponseInfos(const net::HttpResponseInfo* info1,
const net::HttpResponseInfo* info2) {
- Pickle pickle1;
- Pickle pickle2;
+ base::Pickle pickle1;
+ base::Pickle pickle2;
PickleHttpResonseInfo(&pickle1, info1);
PickleHttpResonseInfo(&pickle2, info2);
return (pickle1.size() == pickle2.size()) &&
(0 == memcmp(pickle1.data(), pickle2.data(), pickle1.size()));
}
- int PickleHttpResonseInfo(Pickle* pickle, const net::HttpResponseInfo* info) {
+ int PickleHttpResonseInfo(base::Pickle* pickle,
+ const net::HttpResponseInfo* info) {
const bool kSkipTransientHeaders = true;
const bool kTruncated = false;
info->Persist(pickle, kSkipTransientHeaders, kTruncated);
diff --git a/content/browser/appcache/appcache_service_unittest.cc b/content/browser/appcache/appcache_service_unittest.cc
index b3532f5..4159245 100644
--- a/content/browser/appcache/appcache_service_unittest.cc
+++ b/content/browser/appcache/appcache_service_unittest.cc
@@ -157,11 +157,12 @@ class AppCacheServiceImplTest : public testing::Test {
}
int GetResponseInfoSize(const net::HttpResponseInfo* info) {
- Pickle pickle;
+ base::Pickle pickle;
return PickleResponseInfo(&pickle, info);
}
- int PickleResponseInfo(Pickle* pickle, const net::HttpResponseInfo* info) {
+ int PickleResponseInfo(base::Pickle* pickle,
+ const net::HttpResponseInfo* info) {
const bool kSkipTransientHeaders = true;
const bool kTruncated = false;
info->Persist(pickle, kSkipTransientHeaders, kTruncated);
diff --git a/content/browser/appcache/appcache_url_request_job_unittest.cc b/content/browser/appcache/appcache_url_request_job_unittest.cc
index bd5ff7a..fdd1c9b 100644
--- a/content/browser/appcache/appcache_url_request_job_unittest.cc
+++ b/content/browser/appcache/appcache_url_request_job_unittest.cc
@@ -387,21 +387,22 @@ class AppCacheURLRequestJobTest : public testing::Test {
}
int GetHttpResponseInfoSize(const net::HttpResponseInfo* info) {
- Pickle pickle;
+ base::Pickle pickle;
return PickleHttpResonseInfo(&pickle, info);
}
bool CompareHttpResponseInfos(const net::HttpResponseInfo* info1,
const net::HttpResponseInfo* info2) {
- Pickle pickle1;
- Pickle pickle2;
+ base::Pickle pickle1;
+ base::Pickle pickle2;
PickleHttpResonseInfo(&pickle1, info1);
PickleHttpResonseInfo(&pickle2, info2);
return (pickle1.size() == pickle2.size()) &&
(0 == memcmp(pickle1.data(), pickle2.data(), pickle1.size()));
}
- int PickleHttpResonseInfo(Pickle* pickle, const net::HttpResponseInfo* info) {
+ int PickleHttpResonseInfo(base::Pickle* pickle,
+ const net::HttpResponseInfo* info) {
const bool kSkipTransientHeaders = true;
const bool kTruncated = false;
info->Persist(pickle, kSkipTransientHeaders, kTruncated);
diff --git a/content/browser/browser_plugin/browser_plugin_message_filter.cc b/content/browser/browser_plugin/browser_plugin_message_filter.cc
index c04114d..2e63f03 100644
--- a/content/browser/browser_plugin/browser_plugin_message_filter.cc
+++ b/content/browser/browser_plugin/browser_plugin_message_filter.cc
@@ -60,7 +60,7 @@ void BrowserPluginMessageFilter::ForwardMessageToGuest(
int browser_plugin_instance_id = browser_plugin::kInstanceIDNone;
// All allowed messages must have instance_id as their first parameter.
- PickleIterator iter(message);
+ base::PickleIterator iter(message);
bool success = iter.ReadInt(&browser_plugin_instance_id);
DCHECK(success);
diff --git a/content/browser/download/base_file.cc b/content/browser/download/base_file.cc
index 62ffe57..f9b8015 100644
--- a/content/browser/download/base_file.cc
+++ b/content/browser/download/base_file.cc
@@ -47,8 +47,9 @@ BaseFile::BaseFile(const base::FilePath& full_path,
secure_hash_.reset(crypto::SecureHash::Create(crypto::SecureHash::SHA256));
if ((bytes_so_far_ > 0) && // Not starting at the beginning.
(!IsEmptyHash(hash_state_bytes))) {
- Pickle hash_state(hash_state_bytes.c_str(), hash_state_bytes.size());
- PickleIterator data_iterator(hash_state);
+ base::Pickle hash_state(hash_state_bytes.c_str(),
+ hash_state_bytes.size());
+ base::PickleIterator data_iterator(hash_state);
secure_hash_->Deserialize(&data_iterator);
}
}
@@ -225,7 +226,7 @@ std::string BaseFile::GetHashState() {
if (!calculate_hash_)
return std::string();
- Pickle hash_state;
+ base::Pickle hash_state;
if (!secure_hash_->Serialize(&hash_state))
return std::string();
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index eca4290..73d22c6 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -797,7 +797,7 @@ void RenderFrameHostImpl::OnDidFailLoadWithError(
void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) {
// Read the parameters out of the IPC message directly to avoid making another
// copy when we filter the URLs.
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
FrameHostMsg_DidCommitProvisionalLoad_Params validated_params;
if (!IPC::ParamTraits<FrameHostMsg_DidCommitProvisionalLoad_Params>::
Read(&msg, &iter, &validated_params))
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index c49cb3c..2648ea6 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -982,7 +982,7 @@ bool ResourceDispatcherHostImpl::OnMessageReceived(
IPC_END_MESSAGE_MAP()
if (!handled && IPC_MESSAGE_ID_CLASS(message.type()) == ResourceMsgStart) {
- PickleIterator iter(message);
+ base::PickleIterator iter(message);
int request_id = -1;
bool ok = iter.ReadInt(&request_id);
DCHECK(ok);
diff --git a/content/browser/loader/resource_dispatcher_host_unittest.cc b/content/browser/loader/resource_dispatcher_host_unittest.cc
index 9db7d37..c3b4eca 100644
--- a/content/browser/loader/resource_dispatcher_host_unittest.cc
+++ b/content/browser/loader/resource_dispatcher_host_unittest.cc
@@ -69,7 +69,7 @@ void GetResponseHead(const std::vector<IPC::Message>& messages,
// The first messages should be received response.
ASSERT_EQ(ResourceMsg_ReceivedResponse::ID, messages[0].type());
- PickleIterator iter(messages[0]);
+ base::PickleIterator iter(messages[0]);
int request_id;
ASSERT_TRUE(IPC::ReadParam(&messages[0], &iter, &request_id));
ASSERT_TRUE(IPC::ReadParam(&messages[0], &iter, response_head));
@@ -92,7 +92,7 @@ void GenerateIPCMessage(
// ref-counted core that closes them if not extracted.
void ReleaseHandlesInMessage(const IPC::Message& message) {
if (message.type() == ResourceMsg_SetDataBuffer::ID) {
- PickleIterator iter(message);
+ base::PickleIterator iter(message);
int request_id;
CHECK(iter.ReadInt(&request_id));
base::SharedMemoryHandle shm_handle;
@@ -117,7 +117,7 @@ static int RequestIDForMessage(const IPC::Message& msg) {
case ResourceMsg_DataReceived::ID:
case ResourceMsg_DataDownloaded::ID:
case ResourceMsg_RequestComplete::ID: {
- bool result = PickleIterator(msg).ReadInt(&request_id);
+ bool result = base::PickleIterator(msg).ReadInt(&request_id);
DCHECK(result);
break;
}
@@ -917,7 +917,7 @@ class ResourceDispatcherHostTest : public testing::Test,
EXPECT_EQ(ResourceMsg_DataReceived::ID, msg.type());
int request_id = -1;
- bool result = PickleIterator(msg).ReadInt(&request_id);
+ bool result = base::PickleIterator(msg).ReadInt(&request_id);
DCHECK(result);
scoped_ptr<IPC::Message> ack(
new ResourceHostMsg_DataReceived_ACK(request_id));
@@ -1007,7 +1007,7 @@ void CheckRequestCompleteErrorCode(const IPC::Message& message,
ASSERT_EQ(ResourceMsg_RequestComplete::ID, message.type());
- PickleIterator iter(message);
+ base::PickleIterator iter(message);
ASSERT_TRUE(IPC::ReadParam(&message, &iter, &request_id));
ASSERT_TRUE(IPC::ReadParam(&message, &iter, &error_code));
ASSERT_EQ(expected_error_code, error_code);
@@ -1016,7 +1016,7 @@ void CheckRequestCompleteErrorCode(const IPC::Message& message,
testing::AssertionResult ExtractDataOffsetAndLength(const IPC::Message& message,
int* data_offset,
int* data_length) {
- PickleIterator iter(message);
+ base::PickleIterator iter(message);
int request_id;
if (!IPC::ReadParam(&message, &iter, &request_id))
return testing::AssertionFailure() << "Could not read request_id";
@@ -1047,7 +1047,7 @@ void CheckSuccessfulRequestWithErrorCode(
ASSERT_EQ(ResourceMsg_SetDataBuffer::ID, messages[1].type());
- PickleIterator iter(messages[1]);
+ base::PickleIterator iter(messages[1]);
int request_id;
ASSERT_TRUE(IPC::ReadParam(&messages[1], &iter, &request_id));
base::SharedMemoryHandle shm_handle;
@@ -3013,7 +3013,7 @@ TEST_F(ResourceDispatcherHostTest, DownloadToFile) {
size_t total_len = 0;
for (size_t i = 1; i < messages.size() - 1; i++) {
ASSERT_EQ(ResourceMsg_DataDownloaded::ID, messages[i].type());
- PickleIterator iter(messages[i]);
+ base::PickleIterator iter(messages[i]);
int request_id, data_len;
ASSERT_TRUE(IPC::ReadParam(&messages[i], &iter, &request_id));
ASSERT_TRUE(IPC::ReadParam(&messages[i], &iter, &data_len));
diff --git a/content/browser/loader/resource_scheduler_filter.cc b/content/browser/loader/resource_scheduler_filter.cc
index b9f240d..2777eaa 100644
--- a/content/browser/loader/resource_scheduler_filter.cc
+++ b/content/browser/loader/resource_scheduler_filter.cc
@@ -37,7 +37,7 @@ bool ResourceSchedulerFilter::OnMessageReceived(const IPC::Message& message) {
switch (message.type()) {
case FrameHostMsg_DidCommitProvisionalLoad::ID: {
- PickleIterator iter(message);
+ base::PickleIterator iter(message);
FrameHostMsg_DidCommitProvisionalLoad_Params params;
if (!IPC::ParamTraits<FrameHostMsg_DidCommitProvisionalLoad_Params>::Read(
&message, &iter, &params)) {
diff --git a/content/browser/renderer_host/clipboard_message_filter.cc b/content/browser/renderer_host/clipboard_message_filter.cc
index 88e24d9..e270b7c 100644
--- a/content/browser/renderer_host/clipboard_message_filter.cc
+++ b/content/browser/renderer_host/clipboard_message_filter.cc
@@ -230,7 +230,7 @@ void ClipboardMessageFilter::OnWriteSmartPasteMarker(
void ClipboardMessageFilter::OnWriteCustomData(
ui::ClipboardType clipboard_type,
const std::map<base::string16, base::string16>& data) {
- Pickle pickle;
+ base::Pickle pickle;
ui::WriteCustomDataToPickle(data, &pickle);
clipboard_writer_->WritePickledData(
pickle, ui::Clipboard::GetWebCustomDataFormatType());
diff --git a/content/browser/renderer_host/input/input_router_impl_unittest.cc b/content/browser/renderer_host/input/input_router_impl_unittest.cc
index 2332cbf..918c260 100644
--- a/content/browser/renderer_host/input/input_router_impl_unittest.cc
+++ b/content/browser/renderer_host/input/input_router_impl_unittest.cc
@@ -46,7 +46,7 @@ namespace content {
namespace {
const WebInputEvent* GetInputEventFromMessage(const IPC::Message& message) {
- PickleIterator iter(message);
+ base::PickleIterator iter(message);
const char* data;
int data_length;
if (!iter.ReadData(&data, &data_length))
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc
index ad581ac..fc691c7 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -571,7 +571,7 @@ class RenderWidgetHostTest : public testing::Test {
}
const WebInputEvent* GetInputEventFromMessage(const IPC::Message& message) {
- PickleIterator iter(message);
+ base::PickleIterator iter(message);
const char* data;
int data_length;
if (!iter.ReadData(&data, &data_length))
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
index de4cf01..839c35f 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -363,7 +363,7 @@ class MockWindowObserver : public aura::WindowObserver {
};
const WebInputEvent* GetInputEventFromMessage(const IPC::Message& message) {
- PickleIterator iter(message);
+ base::PickleIterator iter(message);
const char* data;
int data_length;
if (!iter.ReadData(&data, &data_length))
diff --git a/content/browser/renderer_host/sandbox_ipc_linux.cc b/content/browser/renderer_host/sandbox_ipc_linux.cc
index 0c073bf..966f350 100644
--- a/content/browser/renderer_host/sandbox_ipc_linux.cc
+++ b/content/browser/renderer_host/sandbox_ipc_linux.cc
@@ -141,8 +141,8 @@ void SandboxIPCHandler::HandleRequestFromRenderer(int fd) {
if (fds.empty())
return;
- Pickle pickle(buf, len);
- PickleIterator iter(pickle);
+ base::Pickle pickle(buf, len);
+ base::PickleIterator iter(pickle);
int kind;
if (!iter.ReadInt(&kind))
@@ -177,7 +177,7 @@ int SandboxIPCHandler::FindOrAddPath(const SkString& path) {
void SandboxIPCHandler::HandleFontMatchRequest(
int fd,
- PickleIterator iter,
+ base::PickleIterator iter,
const std::vector<base::ScopedFD*>& fds) {
uint32_t requested_style;
std::string family;
@@ -196,7 +196,7 @@ void SandboxIPCHandler::HandleFontMatchRequest(
&result_family,
&result_style);
- Pickle reply;
+ base::Pickle reply;
if (!r) {
reply.WriteBool(false);
} else {
@@ -215,7 +215,7 @@ void SandboxIPCHandler::HandleFontMatchRequest(
void SandboxIPCHandler::HandleFontOpenRequest(
int fd,
- PickleIterator iter,
+ base::PickleIterator iter,
const std::vector<base::ScopedFD*>& fds) {
uint32_t index;
if (!iter.ReadUInt32(&index))
@@ -224,7 +224,7 @@ void SandboxIPCHandler::HandleFontOpenRequest(
return;
const int result_fd = open(paths_[index]->c_str(), O_RDONLY);
- Pickle reply;
+ base::Pickle reply;
if (result_fd == -1) {
reply.WriteBool(false);
} else {
@@ -243,7 +243,7 @@ void SandboxIPCHandler::HandleFontOpenRequest(
void SandboxIPCHandler::HandleGetFallbackFontForChar(
int fd,
- PickleIterator iter,
+ base::PickleIterator iter,
const std::vector<base::ScopedFD*>& fds) {
// The other side of this call is
// content/common/child_process_sandbox_support_impl_linux.cc
@@ -263,7 +263,7 @@ void SandboxIPCHandler::HandleGetFallbackFontForChar(
int pathIndex = FindOrAddPath(SkString(fallbackFont.filename.data()));
fallbackFont.fontconfigInterfaceId = pathIndex;
- Pickle reply;
+ base::Pickle reply;
if (fallbackFont.name.data()) {
reply.WriteString(fallbackFont.name.data());
} else {
@@ -283,7 +283,7 @@ void SandboxIPCHandler::HandleGetFallbackFontForChar(
void SandboxIPCHandler::HandleGetStyleForStrike(
int fd,
- PickleIterator iter,
+ base::PickleIterator iter,
const std::vector<base::ScopedFD*>& fds) {
std::string family;
bool bold, italic;
@@ -307,7 +307,7 @@ void SandboxIPCHandler::HandleGetStyleForStrike(
// These are passed as ints since they're interpreted as tri-state chars in
// Blink.
- Pickle reply;
+ base::Pickle reply;
reply.WriteInt(params.use_bitmaps);
reply.WriteInt(params.autohinter);
reply.WriteInt(params.hinting != gfx::FontRenderParams::HINTING_NONE);
@@ -321,7 +321,7 @@ void SandboxIPCHandler::HandleGetStyleForStrike(
void SandboxIPCHandler::HandleLocaltime(
int fd,
- PickleIterator iter,
+ base::PickleIterator iter,
const std::vector<base::ScopedFD*>& fds) {
// The other side of this call is in zygote_main_linux.cc
@@ -343,7 +343,7 @@ void SandboxIPCHandler::HandleLocaltime(
time_zone_string = expanded_time->tm_zone;
}
- Pickle reply;
+ base::Pickle reply;
reply.WriteString(result_string);
reply.WriteString(time_zone_string);
SendRendererReply(fds, reply, -1);
@@ -351,7 +351,7 @@ void SandboxIPCHandler::HandleLocaltime(
void SandboxIPCHandler::HandleMakeSharedMemorySegment(
int fd,
- PickleIterator iter,
+ base::PickleIterator iter,
const std::vector<base::ScopedFD*>& fds) {
base::SharedMemoryCreateOptions options;
uint32_t size;
@@ -364,13 +364,13 @@ void SandboxIPCHandler::HandleMakeSharedMemorySegment(
base::SharedMemory shm;
if (shm.Create(options))
shm_fd = shm.handle().fd;
- Pickle reply;
+ base::Pickle reply;
SendRendererReply(fds, reply, shm_fd);
}
void SandboxIPCHandler::HandleMatchWithFallback(
int fd,
- PickleIterator iter,
+ base::PickleIterator iter,
const std::vector<base::ScopedFD*>& fds) {
std::string face;
bool is_bold, is_italic;
@@ -387,7 +387,7 @@ void SandboxIPCHandler::HandleMatchWithFallback(
int font_fd = MatchFontFaceWithFallback(
face, is_bold, is_italic, charset, fallback_family);
- Pickle reply;
+ base::Pickle reply;
SendRendererReply(fds, reply, font_fd);
if (font_fd >= 0) {
@@ -398,7 +398,7 @@ void SandboxIPCHandler::HandleMatchWithFallback(
void SandboxIPCHandler::SendRendererReply(
const std::vector<base::ScopedFD*>& fds,
- const Pickle& reply,
+ const base::Pickle& reply,
int reply_fd) {
struct msghdr msg;
memset(&msg, 0, sizeof(msg));
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index 705fbb9..258a128 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -229,7 +229,7 @@ const ui::OSExchangeData::CustomFormat& GetFileSystemFileCustomFormat() {
// Writes file system files to the pickle.
void WriteFileSystemFilesToPickle(
const std::vector<DropData::FileSystemFileInfo>& file_system_files,
- Pickle* pickle) {
+ base::Pickle* pickle) {
pickle->WriteSizeT(file_system_files.size());
for (size_t i = 0; i < file_system_files.size(); ++i) {
pickle->WriteString(file_system_files[i].url.spec());
@@ -239,9 +239,9 @@ void WriteFileSystemFilesToPickle(
// Reads file system files from the pickle.
bool ReadFileSystemFilesFromPickle(
- const Pickle& pickle,
+ const base::Pickle& pickle,
std::vector<DropData::FileSystemFileInfo>* file_system_files) {
- PickleIterator iter(pickle);
+ base::PickleIterator iter(pickle);
size_t num_files = 0;
if (!iter.ReadSizeT(&num_files))
@@ -295,12 +295,12 @@ void PrepareDragData(const DropData& drop_data,
if (!drop_data.filenames.empty())
provider->SetFilenames(drop_data.filenames);
if (!drop_data.file_system_files.empty()) {
- Pickle pickle;
+ base::Pickle pickle;
WriteFileSystemFilesToPickle(drop_data.file_system_files, &pickle);
provider->SetPickledData(GetFileSystemFileCustomFormat(), pickle);
}
if (!drop_data.custom_data.empty()) {
- Pickle pickle;
+ base::Pickle pickle;
ui::WriteCustomDataToPickle(drop_data.custom_data, &pickle);
provider->SetPickledData(ui::Clipboard::GetWebCustomDataFormatType(),
pickle);
@@ -335,7 +335,7 @@ void PrepareDropData(DropData* drop_data, const ui::OSExchangeData& data) {
data.GetFilenames(&drop_data->filenames);
- Pickle pickle;
+ base::Pickle pickle;
std::vector<DropData::FileSystemFileInfo> file_system_files;
if (data.GetPickledData(GetFileSystemFileCustomFormat(), &pickle) &&
ReadFileSystemFilesFromPickle(pickle, &file_system_files))
diff --git a/content/browser/web_contents/web_drag_source_mac.mm b/content/browser/web_contents/web_drag_source_mac.mm
index 57e12a0..e6e8595 100644
--- a/content/browser/web_contents/web_drag_source_mac.mm
+++ b/content/browser/web_contents/web_drag_source_mac.mm
@@ -200,7 +200,7 @@ void PromiseWriterHelper(const DropData& drop_data,
// Custom MIME data.
} else if ([type isEqualToString:ui::kWebCustomDataPboardType]) {
- Pickle pickle;
+ base::Pickle pickle;
ui::WriteCustomDataToPickle(dropData_->custom_data, &pickle);
[pboard setData:[NSData dataWithBytes:pickle.data() length:pickle.size()]
forType:ui::kWebCustomDataPboardType];
diff --git a/content/browser/zygote_host/zygote_host_impl_linux.cc b/content/browser/zygote_host/zygote_host_impl_linux.cc
index 3e8cf7e..3036982 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.";
diff --git a/content/child/bluetooth/bluetooth_message_filter.cc b/content/child/bluetooth/bluetooth_message_filter.cc
index 554e3c3..45b8da6 100644
--- a/content/child/bluetooth/bluetooth_message_filter.cc
+++ b/content/child/bluetooth/bluetooth_message_filter.cc
@@ -31,7 +31,7 @@ void BluetoothMessageFilter::OnFilteredMessageReceived(
bool BluetoothMessageFilter::GetWorkerThreadIdForMessage(
const IPC::Message& msg,
int* ipc_thread_id) {
- return PickleIterator(msg).ReadInt(ipc_thread_id);
+ return base::PickleIterator(msg).ReadInt(ipc_thread_id);
}
} // namespace content
diff --git a/content/child/geofencing/geofencing_message_filter.cc b/content/child/geofencing/geofencing_message_filter.cc
index a866b37..b30645c 100644
--- a/content/child/geofencing/geofencing_message_filter.cc
+++ b/content/child/geofencing/geofencing_message_filter.cc
@@ -30,7 +30,7 @@ void GeofencingMessageFilter::OnFilteredMessageReceived(
bool GeofencingMessageFilter::GetWorkerThreadIdForMessage(
const IPC::Message& msg,
int* ipc_thread_id) {
- return PickleIterator(msg).ReadInt(ipc_thread_id);
+ return base::PickleIterator(msg).ReadInt(ipc_thread_id);
}
} // namespace content
diff --git a/content/child/indexed_db/indexed_db_message_filter.cc b/content/child/indexed_db/indexed_db_message_filter.cc
index 60c1bea..b0d0396 100644
--- a/content/child/indexed_db/indexed_db_message_filter.cc
+++ b/content/child/indexed_db/indexed_db_message_filter.cc
@@ -32,7 +32,7 @@ void IndexedDBMessageFilter::OnFilteredMessageReceived(
bool IndexedDBMessageFilter::GetWorkerThreadIdForMessage(
const IPC::Message& msg,
int* ipc_thread_id) {
- return PickleIterator(msg).ReadInt(ipc_thread_id);
+ return base::PickleIterator(msg).ReadInt(ipc_thread_id);
}
void IndexedDBMessageFilter::OnStaleMessageReceived(const IPC::Message& msg) {
diff --git a/content/child/navigator_connect/navigator_connect_dispatcher.cc b/content/child/navigator_connect/navigator_connect_dispatcher.cc
index 1a30433..ee5bc3e 100644
--- a/content/child/navigator_connect/navigator_connect_dispatcher.cc
+++ b/content/child/navigator_connect/navigator_connect_dispatcher.cc
@@ -30,7 +30,7 @@ void NavigatorConnectDispatcher::OnFilteredMessageReceived(
bool NavigatorConnectDispatcher::GetWorkerThreadIdForMessage(
const IPC::Message& msg,
int* ipc_thread_id) {
- return PickleIterator(msg).ReadInt(ipc_thread_id);
+ return base::PickleIterator(msg).ReadInt(ipc_thread_id);
}
} // namespace content
diff --git a/content/child/notifications/notification_dispatcher.cc b/content/child/notifications/notification_dispatcher.cc
index e99ddc4..1c6fb54 100644
--- a/content/child/notifications/notification_dispatcher.cc
+++ b/content/child/notifications/notification_dispatcher.cc
@@ -41,7 +41,7 @@ bool NotificationDispatcher::GetWorkerThreadIdForMessage(
const IPC::Message& msg,
int* ipc_thread_id) {
int notification_id = -1;
- const bool success = PickleIterator(msg).ReadInt(&notification_id);
+ const bool success = base::PickleIterator(msg).ReadInt(&notification_id);
DCHECK(success);
base::AutoLock lock(notification_id_map_lock_);
diff --git a/content/child/npapi/npruntime_util.cc b/content/child/npapi/npruntime_util.cc
index da2f42c..f3edb9bd 100644
--- a/content/child/npapi/npruntime_util.cc
+++ b/content/child/npapi/npruntime_util.cc
@@ -11,7 +11,7 @@ using blink::WebBindings;
namespace content {
-bool SerializeNPIdentifier(NPIdentifier identifier, Pickle* pickle) {
+bool SerializeNPIdentifier(NPIdentifier identifier, base::Pickle* pickle) {
const NPUTF8* string;
int32_t number;
bool is_string;
@@ -26,7 +26,7 @@ bool SerializeNPIdentifier(NPIdentifier identifier, Pickle* pickle) {
return pickle->WriteInt(number);
}
-bool DeserializeNPIdentifier(PickleIterator* pickle_iter,
+bool DeserializeNPIdentifier(base::PickleIterator* pickle_iter,
NPIdentifier* identifier) {
bool is_string;
if (!pickle_iter->ReadBool(&is_string))
diff --git a/content/child/plugin_param_traits.cc b/content/child/plugin_param_traits.cc
index 27b21dd..903936a 100644
--- a/content/child/plugin_param_traits.cc
+++ b/content/child/plugin_param_traits.cc
@@ -62,7 +62,7 @@ void ParamTraits<NPVariant_Param>::Write(Message* m, const param_type& p) {
}
bool ParamTraits<NPVariant_Param>::Read(const Message* m,
- PickleIterator* iter,
+ base::PickleIterator* iter,
param_type* r) {
int type;
if (!ReadParam(m, iter, &type))
@@ -117,7 +117,7 @@ void ParamTraits<NPIdentifier_Param>::Write(Message* m, const param_type& p) {
}
bool ParamTraits<NPIdentifier_Param>::Read(const Message* m,
- PickleIterator* iter,
+ base::PickleIterator* iter,
param_type* r) {
return content::DeserializeNPIdentifier(iter, &r->identifier);
}
diff --git a/content/child/push_messaging/push_dispatcher.cc b/content/child/push_messaging/push_dispatcher.cc
index 4303443..8d49c12 100644
--- a/content/child/push_messaging/push_dispatcher.cc
+++ b/content/child/push_messaging/push_dispatcher.cc
@@ -47,7 +47,7 @@ bool PushDispatcher::GetWorkerThreadIdForMessage(const IPC::Message& msg,
int* ipc_thread_id) {
int request_id = -1;
- const bool success = PickleIterator(msg).ReadInt(&request_id);
+ const bool success = base::PickleIterator(msg).ReadInt(&request_id);
DCHECK(success);
base::AutoLock lock(request_id_map_lock_);
diff --git a/content/child/quota_message_filter.cc b/content/child/quota_message_filter.cc
index e9290e4..e196ebd 100644
--- a/content/child/quota_message_filter.cc
+++ b/content/child/quota_message_filter.cc
@@ -44,7 +44,7 @@ void QuotaMessageFilter::OnFilteredMessageReceived(const IPC::Message& msg) {
bool QuotaMessageFilter::GetWorkerThreadIdForMessage(const IPC::Message& msg,
int* ipc_thread_id) {
int request_id = -1;
- const bool success = PickleIterator(msg).ReadInt(&request_id);
+ const bool success = base::PickleIterator(msg).ReadInt(&request_id);
DCHECK(success);
base::AutoLock lock(request_id_map_lock_);
diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
index 10bf13c7..59e54f4 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -84,7 +84,7 @@ bool ResourceDispatcher::OnMessageReceived(const IPC::Message& message) {
int request_id;
- PickleIterator iter(message);
+ base::PickleIterator iter(message);
if (!iter.ReadInt(&request_id)) {
NOTREACHED() << "malformed resource message";
return true;
@@ -699,7 +699,7 @@ bool ResourceDispatcher::IsResourceDispatcherMessage(
// static
void ResourceDispatcher::ReleaseResourcesInDataMessage(
const IPC::Message& message) {
- PickleIterator iter(message);
+ base::PickleIterator iter(message);
int request_id;
if (!iter.ReadInt(&request_id)) {
NOTREACHED() << "malformed resource message";
diff --git a/content/child/service_worker/service_worker_message_filter.cc b/content/child/service_worker/service_worker_message_filter.cc
index 3568ad7..9966e41 100644
--- a/content/child/service_worker/service_worker_message_filter.cc
+++ b/content/child/service_worker/service_worker_message_filter.cc
@@ -56,7 +56,7 @@ void ServiceWorkerMessageFilter::OnFilteredMessageReceived(
bool ServiceWorkerMessageFilter::GetWorkerThreadIdForMessage(
const IPC::Message& msg,
int* ipc_thread_id) {
- return PickleIterator(msg).ReadInt(ipc_thread_id);
+ return base::PickleIterator(msg).ReadInt(ipc_thread_id);
}
void ServiceWorkerMessageFilter::OnStaleMessageReceived(
diff --git a/content/child/threaded_data_provider.cc b/content/child/threaded_data_provider.cc
index 4dbcb38..e5ef835 100644
--- a/content/child/threaded_data_provider.cc
+++ b/content/child/threaded_data_provider.cc
@@ -88,7 +88,7 @@ bool DataProviderMessageFilter::OnMessageReceived(
int request_id;
- PickleIterator iter(message);
+ base::PickleIterator iter(message);
if (!iter.ReadInt(&request_id)) {
NOTREACHED() << "malformed resource message";
return true;
diff --git a/content/common/android/gin_java_bridge_value.cc b/content/common/android/gin_java_bridge_value.cc
index 465383c..b9de5f9 100644
--- a/content/common/android/gin_java_bridge_value.cc
+++ b/content/common/android/gin_java_bridge_value.cc
@@ -17,7 +17,7 @@ namespace {
const uint32 kHeaderMagic = 0xBEEFCAFE;
#pragma pack(push, 4)
-struct Header : public Pickle::Header {
+struct Header : public base::Pickle::Header {
uint32 magic;
int32 type;
};
@@ -61,7 +61,7 @@ bool GinJavaBridgeValue::ContainsGinJavaBridgeValue(const base::Value* value) {
reinterpret_cast<const base::BinaryValue*>(value);
if (binary_value->GetSize() < sizeof(Header))
return false;
- Pickle pickle(binary_value->GetBuffer(), binary_value->GetSize());
+ base::Pickle pickle(binary_value->GetBuffer(), binary_value->GetSize());
// Broken binary value: payload or header size is wrong
if (!pickle.data() || pickle.size() - pickle.payload_size() != sizeof(Header))
return false;
@@ -92,7 +92,7 @@ bool GinJavaBridgeValue::IsType(Type type) const {
bool GinJavaBridgeValue::GetAsNonFinite(float* out_value) const {
if (GetType() == TYPE_NONFINITE) {
- PickleIterator iter(pickle_);
+ base::PickleIterator iter(pickle_);
return iter.ReadFloat(out_value);
} else {
return false;
@@ -101,7 +101,7 @@ bool GinJavaBridgeValue::GetAsNonFinite(float* out_value) const {
bool GinJavaBridgeValue::GetAsObjectID(int32* out_object_id) const {
if (GetType() == TYPE_OBJECT_ID) {
- PickleIterator iter(pickle_);
+ base::PickleIterator iter(pickle_);
return iter.ReadInt(out_object_id);
} else {
return false;
diff --git a/content/common/cc_messages.cc b/content/common/cc_messages.cc
index bf8413c..fc5aed9 100644
--- a/content/common/cc_messages.cc
+++ b/content/common/cc_messages.cc
@@ -54,8 +54,9 @@ void ParamTraits<cc::FilterOperation>::Write(
}
}
-bool ParamTraits<cc::FilterOperation>::Read(
- const Message* m, PickleIterator* iter, param_type* r) {
+bool ParamTraits<cc::FilterOperation>::Read(const Message* m,
+ base::PickleIterator* iter,
+ param_type* r) {
cc::FilterOperation::FilterType type;
float amount;
gfx::Point drop_shadow_offset;
@@ -188,8 +189,9 @@ void ParamTraits<cc::FilterOperations>::Write(
}
}
-bool ParamTraits<cc::FilterOperations>::Read(
- const Message* m, PickleIterator* iter, param_type* r) {
+bool ParamTraits<cc::FilterOperations>::Read(const Message* m,
+ base::PickleIterator* iter,
+ param_type* r) {
size_t count;
if (!ReadParam(m, iter, &count))
return false;
@@ -226,8 +228,9 @@ void ParamTraits<skia::RefPtr<SkImageFilter> >::Write(
}
}
-bool ParamTraits<skia::RefPtr<SkImageFilter> >::Read(
- const Message* m, PickleIterator* iter, param_type* r) {
+bool ParamTraits<skia::RefPtr<SkImageFilter>>::Read(const Message* m,
+ base::PickleIterator* iter,
+ param_type* r) {
const char* data = 0;
int length = 0;
if (!iter->ReadData(&data, &length))
@@ -261,8 +264,9 @@ void ParamTraits<gfx::Transform>::Write(
m->WriteBytes(&column_major_data, sizeof(SkMScalar) * 16);
}
-bool ParamTraits<gfx::Transform>::Read(
- const Message* m, PickleIterator* iter, param_type* r) {
+bool ParamTraits<gfx::Transform>::Read(const Message* m,
+ base::PickleIterator* iter,
+ param_type* r) {
const char* column_major_data;
if (!iter->ReadBytes(&column_major_data, sizeof(SkMScalar) * 16))
return false;
@@ -387,7 +391,7 @@ static size_t ReserveSizeForRenderPassWrite(const cc::RenderPass& p) {
template <typename QuadType>
static cc::DrawQuad* ReadDrawQuad(const Message* m,
- PickleIterator* iter,
+ base::PickleIterator* iter,
cc::RenderPass* render_pass) {
QuadType* quad = render_pass->CreateAndAppendDrawQuad<QuadType>();
if (!ReadParam(m, iter, quad))
@@ -395,8 +399,9 @@ static cc::DrawQuad* ReadDrawQuad(const Message* m,
return quad;
}
-bool ParamTraits<cc::RenderPass>::Read(
- const Message* m, PickleIterator* iter, param_type* p) {
+bool ParamTraits<cc::RenderPass>::Read(const Message* m,
+ base::PickleIterator* iter,
+ param_type* p) {
cc::RenderPassId id(-1, -1);
gfx::Rect output_rect;
gfx::Rect damage_rect;
@@ -420,7 +425,7 @@ bool ParamTraits<cc::RenderPass>::Read(
for (size_t i = 0; i < quad_list_size; ++i) {
cc::DrawQuad::Material material;
- PickleIterator temp_iter = *iter;
+ base::PickleIterator temp_iter = *iter;
if (!ReadParam(m, &temp_iter, &material))
return false;
@@ -590,7 +595,7 @@ void ParamTraits<cc::CompositorFrame>::Write(Message* m,
}
bool ParamTraits<cc::CompositorFrame>::Read(const Message* m,
- PickleIterator* iter,
+ base::PickleIterator* iter,
param_type* p) {
if (!ReadParam(m, iter, &p->metadata))
return false;
@@ -650,7 +655,7 @@ void ParamTraits<cc::CompositorFrameAck>::Write(Message* m,
}
bool ParamTraits<cc::CompositorFrameAck>::Read(const Message* m,
- PickleIterator* iter,
+ base::PickleIterator* iter,
param_type* p) {
if (!ReadParam(m, iter, &p->resources))
return false;
@@ -712,7 +717,7 @@ void ParamTraits<cc::DelegatedFrameData>::Write(Message* m,
}
bool ParamTraits<cc::DelegatedFrameData>::Read(const Message* m,
- PickleIterator* iter,
+ base::PickleIterator* iter,
param_type* p) {
if (!ReadParam(m, iter, &p->device_scale_factor))
return false;
@@ -782,7 +787,7 @@ void ParamTraits<cc::SoftwareFrameData>::Write(Message* m,
}
bool ParamTraits<cc::SoftwareFrameData>::Read(const Message* m,
- PickleIterator* iter,
+ base::PickleIterator* iter,
param_type* p) {
if (!ReadParam(m, iter, &p->id))
return false;
diff --git a/content/common/cc_messages_unittest.cc b/content/common/cc_messages_unittest.cc
index 4ebaebb..8ba443d 100644
--- a/content/common/cc_messages_unittest.cc
+++ b/content/common/cc_messages_unittest.cc
@@ -495,7 +495,7 @@ TEST_F(CCMessagesTest, AllQuads) {
IPC::ParamTraits<DelegatedFrameData>::Write(&msg, frame_in);
DelegatedFrameData frame_out;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg,
&iter, &frame_out));
@@ -617,7 +617,7 @@ TEST_F(CCMessagesTest, UnusedSharedQuadStates) {
IPC::ParamTraits<DelegatedFrameData>::Write(&msg, frame_in);
DelegatedFrameData frame_out;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
EXPECT_TRUE(
IPC::ParamTraits<DelegatedFrameData>::Read(&msg, &iter, &frame_out));
@@ -685,7 +685,7 @@ TEST_F(CCMessagesTest, Resources) {
IPC::ParamTraits<DelegatedFrameData>::Write(&msg, frame_in);
DelegatedFrameData frame_out;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg,
&iter, &frame_out));
@@ -707,7 +707,7 @@ TEST_F(CCMessagesTest, SoftwareFrameData) {
// Read the frame.
cc::SoftwareFrameData frame_out;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
EXPECT_TRUE(
IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out));
EXPECT_EQ(frame_in.id, frame_out.id);
@@ -731,7 +731,7 @@ TEST_F(CCMessagesTest, SoftwareFrameDataMaxInt) {
IPC::WriteParam(&msg, frame_in.damage_rect);
IPC::WriteParam(&msg, frame_in.bitmap_id);
SoftwareFrameData frame_out;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
EXPECT_TRUE(
IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out));
}
@@ -752,7 +752,7 @@ TEST_F(CCMessagesTest, SoftwareFrameDataMaxInt) {
IPC::WriteParam(&msg, frame_in.damage_rect);
IPC::WriteParam(&msg, frame_in.bitmap_id);
SoftwareFrameData frame_out;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
EXPECT_EQ(
expect_read,
IPC::ParamTraits<SoftwareFrameData>::Read(&msg, &iter, &frame_out));
diff --git a/content/common/child_process_sandbox_support_impl_linux.cc b/content/common/child_process_sandbox_support_impl_linux.cc
index 464a2e0..cecd833 100644
--- a/content/common/child_process_sandbox_support_impl_linux.cc
+++ b/content/common/child_process_sandbox_support_impl_linux.cc
@@ -27,7 +27,7 @@ void GetFallbackFontForCharacter(int32_t character,
blink::WebFallbackFont* fallbackFont) {
TRACE_EVENT0("sandbox_ipc", "GetFontFamilyForCharacter");
- Pickle request;
+ base::Pickle request;
request.WriteInt(LinuxSandbox::METHOD_GET_FALLBACK_FONT_FOR_CHAR);
request.WriteInt(character);
request.WriteString(preferred_locale);
@@ -43,8 +43,8 @@ void GetFallbackFontForCharacter(int32_t character,
bool isBold = false;
bool isItalic = false;
if (n != -1) {
- Pickle reply(reinterpret_cast<char*>(buf), n);
- PickleIterator pickle_iter(reply);
+ base::Pickle reply(reinterpret_cast<char*>(buf), n);
+ base::PickleIterator pickle_iter(reply);
if (pickle_iter.ReadString(&family_name) &&
pickle_iter.ReadString(&filename) &&
pickle_iter.ReadInt(&fontconfigInterfaceId) &&
@@ -77,7 +77,7 @@ void GetRenderStyleForStrike(const char* family,
if (pixel_size > std::numeric_limits<uint16>::max())
return;
- Pickle request;
+ base::Pickle request;
request.WriteInt(LinuxSandbox::METHOD_GET_STYLE_FOR_STRIKE);
request.WriteString(family);
request.WriteBool(bold);
@@ -90,8 +90,8 @@ void GetRenderStyleForStrike(const char* family,
if (n == -1)
return;
- Pickle reply(reinterpret_cast<char*>(buf), n);
- PickleIterator pickle_iter(reply);
+ base::Pickle reply(reinterpret_cast<char*>(buf), n);
+ base::PickleIterator pickle_iter(reply);
int use_bitmaps, use_autohint, use_hinting, hint_style, use_antialias;
int use_subpixel_rendering, use_subpixel_positioning;
if (pickle_iter.ReadInt(&use_bitmaps) &&
@@ -118,7 +118,7 @@ int MatchFontWithFallback(const std::string& face,
PP_BrowserFont_Trusted_Family fallback_family) {
TRACE_EVENT0("sandbox_ipc", "MatchFontWithFallback");
- Pickle request;
+ base::Pickle request;
request.WriteInt(LinuxSandbox::METHOD_MATCH_WITH_FALLBACK);
request.WriteString(face);
request.WriteBool(bold);
diff --git a/content/common/child_process_sandbox_support_impl_shm_linux.cc b/content/common/child_process_sandbox_support_impl_shm_linux.cc
index 4c05742..1553826 100644
--- a/content/common/child_process_sandbox_support_impl_shm_linux.cc
+++ b/content/common/child_process_sandbox_support_impl_shm_linux.cc
@@ -11,7 +11,7 @@
namespace content {
int MakeSharedMemorySegmentViaIPC(size_t length, bool executable) {
- Pickle request;
+ base::Pickle request;
request.WriteInt(LinuxSandbox::METHOD_MAKE_SHARED_MEMORY_SEGMENT);
request.WriteUInt32(length);
request.WriteBool(executable);
diff --git a/content/common/common_param_traits_unittest.cc b/content/common/common_param_traits_unittest.cc
index 0f810db..aefab1c 100644
--- a/content/common/common_param_traits_unittest.cc
+++ b/content/common/common_param_traits_unittest.cc
@@ -33,7 +33,7 @@ TEST(IPCMessageTest, Serialize) {
IPC::ParamTraits<GURL>::Write(&msg, input);
GURL output;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
EXPECT_TRUE(IPC::ParamTraits<GURL>::Read(&msg, &iter, &output));
// We want to test each component individually to make sure its range was
@@ -59,7 +59,7 @@ TEST(IPCMessageTest, Serialize) {
IPC::ParamTraits<GURL>::Write(&msg, input);
GURL output;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
EXPECT_TRUE(IPC::ParamTraits<GURL>::Read(&msg, &iter, &output));
EXPECT_TRUE(output.is_empty());
}
@@ -69,7 +69,7 @@ TEST(IPCMessageTest, Serialize) {
IPC::Message msg;
msg.WriteString("#inva://idurl/");
GURL output;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
EXPECT_FALSE(IPC::ParamTraits<GURL>::Read(&msg, &iter, &output));
}
@@ -77,7 +77,7 @@ TEST(IPCMessageTest, Serialize) {
IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
msg.WriteInt(99);
GURL output;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
EXPECT_FALSE(IPC::ParamTraits<GURL>::Read(&msg, &iter, &output));
}
@@ -90,7 +90,7 @@ TEST(IPCMessageTest, Pair) {
IPC::ParamTraits<TestPair>::Write(&msg, input);
TestPair output;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
EXPECT_TRUE(IPC::ParamTraits<TestPair>::Read(&msg, &iter, &output));
EXPECT_EQ(output.first, "foo");
EXPECT_EQ(output.second, "bar");
@@ -107,7 +107,7 @@ TEST(IPCMessageTest, Bitmap) {
IPC::ParamTraits<SkBitmap>::Write(&msg, bitmap);
SkBitmap output;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
EXPECT_TRUE(IPC::ParamTraits<SkBitmap>::Read(&msg, &iter, &output));
EXPECT_EQ(bitmap.colorType(), output.colorType());
@@ -123,7 +123,7 @@ TEST(IPCMessageTest, Bitmap) {
// Copy the first message block over to |bad_msg|.
const char* fixed_data;
int fixed_data_size;
- iter = PickleIterator(msg);
+ iter = base::PickleIterator(msg);
EXPECT_TRUE(iter.ReadData(&fixed_data, &fixed_data_size));
bad_msg.WriteData(fixed_data, fixed_data_size);
// Add some bogus pixel data.
@@ -133,7 +133,7 @@ TEST(IPCMessageTest, Bitmap) {
bad_msg.WriteData(bogus_pixels.get(), bogus_pixels_size);
// Make sure we don't read out the bitmap!
SkBitmap bad_output;
- iter = PickleIterator(bad_msg);
+ iter = base::PickleIterator(bad_msg);
EXPECT_FALSE(IPC::ParamTraits<SkBitmap>::Read(&bad_msg, &iter, &bad_output));
}
@@ -147,7 +147,7 @@ TEST(IPCMessageTest, ListValue) {
IPC::WriteParam(&msg, input);
base::ListValue output;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
EXPECT_TRUE(IPC::ReadParam(&msg, &iter, &output));
EXPECT_TRUE(input.Equals(&output));
@@ -155,7 +155,7 @@ TEST(IPCMessageTest, ListValue) {
// Also test the corrupt case.
IPC::Message bad_msg(1, 2, IPC::Message::PRIORITY_NORMAL);
bad_msg.WriteInt(99);
- iter = PickleIterator(bad_msg);
+ iter = base::PickleIterator(bad_msg);
EXPECT_FALSE(IPC::ReadParam(&bad_msg, &iter, &output));
}
@@ -181,7 +181,7 @@ TEST(IPCMessageTest, DictionaryValue) {
IPC::WriteParam(&msg, input);
base::DictionaryValue output;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
EXPECT_TRUE(IPC::ReadParam(&msg, &iter, &output));
EXPECT_TRUE(input.Equals(&output));
@@ -189,7 +189,7 @@ TEST(IPCMessageTest, DictionaryValue) {
// Also test the corrupt case.
IPC::Message bad_msg(1, 2, IPC::Message::PRIORITY_NORMAL);
bad_msg.WriteInt(99);
- iter = PickleIterator(bad_msg);
+ iter = base::PickleIterator(bad_msg);
EXPECT_FALSE(IPC::ReadParam(&bad_msg, &iter, &output));
}
@@ -201,7 +201,7 @@ TEST(IPCMessageTest, HostPortPair) {
IPC::ParamTraits<net::HostPortPair>::Write(&msg, input);
net::HostPortPair output;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
EXPECT_TRUE(IPC::ParamTraits<net::HostPortPair>::Read(&msg, &iter, &output));
EXPECT_EQ(input.host(), output.host());
EXPECT_EQ(input.port(), output.port());
diff --git a/content/common/content_param_traits.cc b/content/common/content_param_traits.cc
index 8faf97c..2924d61 100644
--- a/content/common/content_param_traits.cc
+++ b/content/common/content_param_traits.cc
@@ -15,7 +15,7 @@ void ParamTraits<WebInputEventPointer>::Write(Message* m, const param_type& p) {
}
bool ParamTraits<WebInputEventPointer>::Read(const Message* m,
- PickleIterator* iter,
+ base::PickleIterator* iter,
param_type* r) {
const char* data;
int data_length;
diff --git a/content/common/cursors/webcursor.cc b/content/common/cursors/webcursor.cc
index 85721fd..6bc3f3e 100644
--- a/content/common/cursors/webcursor.cc
+++ b/content/common/cursors/webcursor.cc
@@ -80,7 +80,7 @@ void WebCursor::GetCursorInfo(CursorInfo* cursor_info) const {
#endif
}
-bool WebCursor::Deserialize(PickleIterator* iter) {
+bool WebCursor::Deserialize(base::PickleIterator* iter) {
int type, hotspot_x, hotspot_y, size_x, size_y, data_len;
float scale;
const char* data;
@@ -132,7 +132,7 @@ bool WebCursor::Deserialize(PickleIterator* iter) {
return DeserializePlatformData(iter);
}
-bool WebCursor::Serialize(Pickle* pickle) const {
+bool WebCursor::Serialize(base::Pickle* pickle) const {
if (!pickle->WriteInt(type_) ||
!pickle->WriteInt(hotspot_.x()) ||
!pickle->WriteInt(hotspot_.y()) ||
diff --git a/content/common/font_config_ipc_linux.cc b/content/common/font_config_ipc_linux.cc
index 342202b..7d2ac24 100644
--- a/content/common/font_config_ipc_linux.cc
+++ b/content/common/font_config_ipc_linux.cc
@@ -90,7 +90,7 @@ bool FontConfigIPC::matchFamilyName(const char familyName[],
if (familyNameLen > kMaxFontFamilyLength)
return false;
- Pickle request;
+ base::Pickle request;
request.WriteInt(METHOD_MATCH);
request.WriteData(familyName, familyNameLen);
request.WriteUInt32(requestedStyle);
@@ -101,8 +101,8 @@ bool FontConfigIPC::matchFamilyName(const char familyName[],
if (r == -1)
return false;
- Pickle reply(reinterpret_cast<char*>(reply_buf), r);
- PickleIterator iter(reply);
+ base::Pickle reply(reinterpret_cast<char*>(reply_buf), r);
+ base::PickleIterator iter(reply);
bool result;
if (!iter.ReadBool(&result))
return false;
@@ -138,7 +138,7 @@ SkStreamAsset* FontConfigIPC::openStream(const FontIdentity& identity) {
return mapped_font_files_it->second->CreateMemoryStream();
}
- Pickle request;
+ base::Pickle request;
request.WriteInt(METHOD_OPEN);
request.WriteUInt32(identity.fID);
@@ -149,9 +149,9 @@ SkStreamAsset* FontConfigIPC::openStream(const FontIdentity& identity) {
if (r == -1)
return NULL;
- Pickle reply(reinterpret_cast<char*>(reply_buf), r);
+ base::Pickle reply(reinterpret_cast<char*>(reply_buf), r);
bool result;
- PickleIterator iter(reply);
+ base::PickleIterator iter(reply);
if (!iter.ReadBool(&result) || !result) {
if (result_fd)
CloseFD(result_fd);
diff --git a/content/common/gamepad_param_traits.cc b/content/common/gamepad_param_traits.cc
index cc60d7c..cbc7e6a 100644
--- a/content/common/gamepad_param_traits.cc
+++ b/content/common/gamepad_param_traits.cc
@@ -36,10 +36,9 @@ void ParamTraits<WebGamepad>::Write(
m->WriteData(reinterpret_cast<const char*>(&p), sizeof(WebGamepad));
}
-bool ParamTraits<WebGamepad>::Read(
- const Message* m,
- PickleIterator* iter,
- WebGamepad* p) {
+bool ParamTraits<WebGamepad>::Read(const Message* m,
+ base::PickleIterator* iter,
+ WebGamepad* p) {
int length;
const char* data;
if (!iter->ReadData(&data, &length) || length != sizeof(WebGamepad))
diff --git a/content/common/indexed_db/indexed_db_param_traits.cc b/content/common/indexed_db/indexed_db_param_traits.cc
index 4e52946..9ca0cec 100644
--- a/content/common/indexed_db/indexed_db_param_traits.cc
+++ b/content/common/indexed_db/indexed_db_param_traits.cc
@@ -59,7 +59,7 @@ void ParamTraits<IndexedDBKey>::Write(Message* m, const param_type& p) {
}
bool ParamTraits<IndexedDBKey>::Read(const Message* m,
- PickleIterator* iter,
+ base::PickleIterator* iter,
param_type* r) {
int type;
if (!ReadParam(m, iter, &type))
@@ -171,7 +171,7 @@ void ParamTraits<IndexedDBKeyPath>::Write(Message* m, const param_type& p) {
}
bool ParamTraits<IndexedDBKeyPath>::Read(const Message* m,
- PickleIterator* iter,
+ base::PickleIterator* iter,
param_type* r) {
int type;
if (!ReadParam(m, iter, &type))
@@ -238,7 +238,7 @@ void ParamTraits<IndexedDBKeyRange>::Write(Message* m, const param_type& p) {
}
bool ParamTraits<IndexedDBKeyRange>::Read(const Message* m,
- PickleIterator* iter,
+ base::PickleIterator* iter,
param_type* r) {
IndexedDBKey lower;
if (!ReadParam(m, iter, &lower))
diff --git a/content/common/input/input_param_traits.cc b/content/common/input/input_param_traits.cc
index 1f4b7e4..b0d079f 100644
--- a/content/common/input/input_param_traits.cc
+++ b/content/common/input/input_param_traits.cc
@@ -13,11 +13,10 @@
namespace IPC {
namespace {
-template<typename GestureType>
+template <typename GestureType>
scoped_ptr<content::SyntheticGestureParams> ReadGestureParams(
const Message* m,
- PickleIterator* iter)
-{
+ base::PickleIterator* iter) {
scoped_ptr<GestureType> gesture_params(new GestureType);
if (!ReadParam(m, iter, gesture_params.get()))
return scoped_ptr<content::SyntheticGestureParams>();
@@ -35,7 +34,7 @@ void ParamTraits<content::ScopedWebInputEvent>::Write(Message* m,
}
bool ParamTraits<content::ScopedWebInputEvent>::Read(const Message* m,
- PickleIterator* iter,
+ base::PickleIterator* iter,
param_type* p) {
bool valid_web_event = false;
WebInputEventPointer web_event_pointer = NULL;
@@ -78,9 +77,10 @@ void ParamTraits<content::SyntheticGesturePacket>::Write(Message* m,
}
}
-bool ParamTraits<content::SyntheticGesturePacket>::Read(const Message* m,
- PickleIterator* iter,
- param_type* p) {
+bool ParamTraits<content::SyntheticGesturePacket>::Read(
+ const Message* m,
+ base::PickleIterator* iter,
+ param_type* p) {
content::SyntheticGestureParams::GestureType gesture_type;
if (!ReadParam(m, iter, &gesture_type))
return false;
diff --git a/content/common/input/input_param_traits_unittest.cc b/content/common/input/input_param_traits_unittest.cc
index b70b19c..f40152f 100644
--- a/content/common/input/input_param_traits_unittest.cc
+++ b/content/common/input/input_param_traits_unittest.cc
@@ -108,7 +108,7 @@ class InputParamTraitsTest : public testing::Test {
IPC::ParamTraits<InputEvents>::Write(&msg, events_in);
InputEvents events_out;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
EXPECT_TRUE(IPC::ParamTraits<InputEvents>::Read(&msg, &iter, &events_out));
Compare(&events_in, &events_out);
@@ -127,7 +127,7 @@ class InputParamTraitsTest : public testing::Test {
IPC::ParamTraits<SyntheticGesturePacket>::Write(&msg, packet_in);
SyntheticGesturePacket packet_out;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
EXPECT_TRUE(IPC::ParamTraits<SyntheticGesturePacket>::Read(&msg, &iter,
&packet_out));
@@ -151,7 +151,7 @@ TEST_F(InputParamTraitsTest, UninitializedEvents) {
IPC::WriteParam(&msg, event);
InputEvent event_out;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
EXPECT_FALSE(IPC::ReadParam(&msg, &iter, &event_out));
}
@@ -197,7 +197,7 @@ TEST_F(InputParamTraitsTest, InvalidSyntheticGestureParams) {
WriteParam(&msg, -3);
SyntheticGesturePacket packet_out;
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
ASSERT_FALSE(
IPC::ParamTraits<SyntheticGesturePacket>::Read(&msg, &iter, &packet_out));
}
diff --git a/content/common/mac/attributed_string_coder.mm b/content/common/mac/attributed_string_coder.mm
index ed377bb..edbb0ae 100644
--- a/content/common/mac/attributed_string_coder.mm
+++ b/content/common/mac/attributed_string_coder.mm
@@ -128,7 +128,9 @@ void ParamTraits<AttributedStringCoder::EncodedString>::Write(
}
bool ParamTraits<AttributedStringCoder::EncodedString>::Read(
- const Message* m, PickleIterator* iter, param_type* p) {
+ const Message* m,
+ base::PickleIterator* iter,
+ param_type* p) {
bool success = true;
base::string16 result;
@@ -151,7 +153,9 @@ void ParamTraits<AttributedStringCoder::FontAttribute>::Write(
}
bool ParamTraits<AttributedStringCoder::FontAttribute>::Read(
- const Message* m, PickleIterator* iter, param_type* p) {
+ const Message* m,
+ base::PickleIterator* iter,
+ param_type* p) {
bool success = true;
FontDescriptor font;
diff --git a/content/common/media/media_param_traits.cc b/content/common/media/media_param_traits.cc
index a9606ce..280d908 100644
--- a/content/common/media/media_param_traits.cc
+++ b/content/common/media/media_param_traits.cc
@@ -28,7 +28,7 @@ void ParamTraits<AudioParameters>::Write(Message* m,
}
bool ParamTraits<AudioParameters>::Read(const Message* m,
- PickleIterator* iter,
+ base::PickleIterator* iter,
AudioParameters* r) {
int format, channel_layout, sample_rate, bits_per_sample,
frames_per_buffer, channels, effects;
@@ -66,7 +66,7 @@ void ParamTraits<VideoCaptureFormat>::Write(Message* m,
}
bool ParamTraits<VideoCaptureFormat>::Read(const Message* m,
- PickleIterator* iter,
+ base::PickleIterator* iter,
VideoCaptureFormat* r) {
int frame_size_width, frame_size_height, pixel_format;
if (!iter->ReadInt(&frame_size_width) ||
diff --git a/content/common/page_state_serialization.cc b/content/common/page_state_serialization.cc
index 77e2abf..b40b457 100644
--- a/content/common/page_state_serialization.cc
+++ b/content/common/page_state_serialization.cc
@@ -167,15 +167,15 @@ struct SerializeObject {
: pickle(data, len),
version(0),
parse_error(false) {
- iter = PickleIterator(pickle);
+ iter = base::PickleIterator(pickle);
}
std::string GetAsString() {
return std::string(static_cast<const char*>(pickle.data()), pickle.size());
}
- Pickle pickle;
- PickleIterator iter;
+ base::Pickle pickle;
+ base::PickleIterator iter;
int version;
bool parse_error;
};
diff --git a/content/common/page_state_serialization_unittest.cc b/content/common/page_state_serialization_unittest.cc
index 9f58c76..abb2a39 100644
--- a/content/common/page_state_serialization_unittest.cc
+++ b/content/common/page_state_serialization_unittest.cc
@@ -322,7 +322,7 @@ TEST_F(PageStateSerializationTest, BasicFrameSetPOST) {
}
TEST_F(PageStateSerializationTest, BadMessagesTest1) {
- Pickle p;
+ base::Pickle p;
// Version 14
p.WriteInt(14);
// Empty strings.
@@ -339,7 +339,7 @@ TEST_F(PageStateSerializationTest, BadMessagesTest1) {
TEST_F(PageStateSerializationTest, BadMessagesTest2) {
double d = 0;
- Pickle p;
+ base::Pickle p;
// Version 14
p.WriteInt(14);
// Empty strings.
diff --git a/content/common/resource_messages.cc b/content/common/resource_messages.cc
index 6fcda2ab..2f86ae2 100644
--- a/content/common/resource_messages.cc
+++ b/content/common/resource_messages.cc
@@ -18,8 +18,10 @@ void ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Write(
}
}
-bool ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Read(
- const Message* m, PickleIterator* iter, param_type* r) {
+bool ParamTraits<scoped_refptr<net::HttpResponseHeaders>>::Read(
+ const Message* m,
+ base::PickleIterator* iter,
+ param_type* r) {
bool has_object;
if (!ReadParam(m, iter, &has_object))
return false;
@@ -65,7 +67,7 @@ void ParamTraits<storage::DataElement>::Write(Message* m, const param_type& p) {
}
bool ParamTraits<storage::DataElement>::Read(const Message* m,
- PickleIterator* iter,
+ base::PickleIterator* iter,
param_type* r) {
int type;
if (!ReadParam(m, iter, &type))
@@ -146,8 +148,10 @@ void ParamTraits<scoped_refptr<content::ResourceDevToolsInfo> >::Write(
}
}
-bool ParamTraits<scoped_refptr<content::ResourceDevToolsInfo> >::Read(
- const Message* m, PickleIterator* iter, param_type* r) {
+bool ParamTraits<scoped_refptr<content::ResourceDevToolsInfo>>::Read(
+ const Message* m,
+ base::PickleIterator* iter,
+ param_type* r) {
bool has_object;
if (!ReadParam(m, iter, &has_object))
return false;
@@ -196,8 +200,9 @@ void ParamTraits<net::LoadTimingInfo>::Write(
WriteParam(m, p.receive_headers_end);
}
-bool ParamTraits<net::LoadTimingInfo>::Read(
- const Message* m, PickleIterator* iter, param_type* r) {
+bool ParamTraits<net::LoadTimingInfo>::Read(const Message* m,
+ base::PickleIterator* iter,
+ param_type* r) {
bool has_no_times;
if (!ReadParam(m, iter, &r->socket_log_id) ||
!ReadParam(m, iter, &r->socket_reused) ||
@@ -268,9 +273,9 @@ void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Write(
}
}
-bool ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Read(
+bool ParamTraits<scoped_refptr<content::ResourceRequestBody>>::Read(
const Message* m,
- PickleIterator* iter,
+ base::PickleIterator* iter,
param_type* r) {
bool has_object;
if (!ReadParam(m, iter, &has_object))
diff --git a/content/common/ssl_status_serialization.cc b/content/common/ssl_status_serialization.cc
index 0e2e4d2..71dba9e 100644
--- a/content/common/ssl_status_serialization.cc
+++ b/content/common/ssl_status_serialization.cc
@@ -16,7 +16,7 @@ std::string SerializeSecurityInfo(
int ssl_connection_status,
const SignedCertificateTimestampIDStatusList&
signed_certificate_timestamp_ids) {
- Pickle pickle;
+ base::Pickle pickle;
pickle.WriteInt(cert_id);
pickle.WriteUInt32(cert_status);
pickle.WriteInt(security_bits);
@@ -51,8 +51,8 @@ bool DeserializeSecurityInfo(
return false;
}
- Pickle pickle(state.data(), static_cast<int>(state.size()));
- PickleIterator iter(pickle);
+ base::Pickle pickle(state.data(), static_cast<int>(state.size()));
+ base::PickleIterator iter(pickle);
int num_scts_to_read;
if (!iter.ReadInt(cert_id) ||
!iter.ReadUInt32(cert_status) ||
diff --git a/content/public/common/common_param_traits.cc b/content/public/common/common_param_traits.cc
index 7ed8236..7347160 100644
--- a/content/public/common/common_param_traits.cc
+++ b/content/public/common/common_param_traits.cc
@@ -36,7 +36,9 @@ void ParamTraits<GURL>::Write(Message* m, const GURL& p) {
// TODO(brettw) bug 684583: Add encoding for query params.
}
-bool ParamTraits<GURL>::Read(const Message* m, PickleIterator* iter, GURL* p) {
+bool ParamTraits<GURL>::Read(const Message* m,
+ base::PickleIterator* iter,
+ GURL* p) {
std::string s;
if (!iter->ReadString(&s) || s.length() > content::GetMaxURLChars()) {
*p = GURL();
@@ -60,7 +62,7 @@ void ParamTraits<url::Origin>::Write(Message* m,
}
bool ParamTraits<url::Origin>::Read(const Message* m,
- PickleIterator* iter,
+ base::PickleIterator* iter,
url::Origin* p) {
std::string s;
if (!iter->ReadString(&s)) {
@@ -81,7 +83,7 @@ void ParamTraits<net::HostPortPair>::Write(Message* m, const param_type& p) {
}
bool ParamTraits<net::HostPortPair>::Read(const Message* m,
- PickleIterator* iter,
+ base::PickleIterator* iter,
param_type* r) {
std::string host;
uint16 port;
@@ -102,7 +104,8 @@ void ParamTraits<net::IPEndPoint>::Write(Message* m, const param_type& p) {
WriteParam(m, p.port());
}
-bool ParamTraits<net::IPEndPoint>::Read(const Message* m, PickleIterator* iter,
+bool ParamTraits<net::IPEndPoint>::Read(const Message* m,
+ base::PickleIterator* iter,
param_type* p) {
net::IPAddressNumber address;
uint16 port;
@@ -126,8 +129,9 @@ void ParamTraits<content::PageState>::Write(
WriteParam(m, p.ToEncodedData());
}
-bool ParamTraits<content::PageState>::Read(
- const Message* m, PickleIterator* iter, param_type* r) {
+bool ParamTraits<content::PageState>::Read(const Message* m,
+ base::PickleIterator* iter,
+ param_type* r) {
std::string data;
if (!ReadParam(m, iter, &data))
return false;
diff --git a/content/renderer/browser_plugin/browser_plugin_manager.cc b/content/renderer/browser_plugin/browser_plugin_manager.cc
index a95c310..186d6bf6 100644
--- a/content/renderer/browser_plugin/browser_plugin_manager.cc
+++ b/content/renderer/browser_plugin/browser_plugin_manager.cc
@@ -92,7 +92,7 @@ bool BrowserPluginManager::OnControlMessageReceived(
int browser_plugin_instance_id = browser_plugin::kInstanceIDNone;
// All allowed messages must have |browser_plugin_instance_id| as their
// first parameter.
- PickleIterator iter(message);
+ base::PickleIterator iter(message);
bool success = iter.ReadInt(&browser_plugin_instance_id);
DCHECK(success);
BrowserPlugin* plugin = GetBrowserPlugin(browser_plugin_instance_id);
diff --git a/content/renderer/cache_storage/cache_storage_message_filter.cc b/content/renderer/cache_storage/cache_storage_message_filter.cc
index e4d4835..5f7fad4 100644
--- a/content/renderer/cache_storage/cache_storage_message_filter.cc
+++ b/content/renderer/cache_storage/cache_storage_message_filter.cc
@@ -32,7 +32,7 @@ void CacheStorageMessageFilter::OnFilteredMessageReceived(
bool CacheStorageMessageFilter::GetWorkerThreadIdForMessage(
const IPC::Message& msg,
int* ipc_thread_id) {
- return PickleIterator(msg).ReadInt(ipc_thread_id);
+ return base::PickleIterator(msg).ReadInt(ipc_thread_id);
}
} // namespace content
diff --git a/content/renderer/scheduler/resource_dispatch_throttler_unittest.cc b/content/renderer/scheduler/resource_dispatch_throttler_unittest.cc
index 8b9dc14..296c28a 100644
--- a/content/renderer/scheduler/resource_dispatch_throttler_unittest.cc
+++ b/content/renderer/scheduler/resource_dispatch_throttler_unittest.cc
@@ -22,7 +22,7 @@ int GetRequestId(const IPC::Message& msg) {
int request_id = -1;
switch (msg.type()) {
case ResourceHostMsg_RequestResource::ID: {
- PickleIterator iter(msg);
+ base::PickleIterator iter(msg);
int routing_id = -1;
if (!iter.ReadInt(&routing_id) || !iter.ReadInt(&request_id))
NOTREACHED() << "Invalid id for resource request message.";
@@ -31,7 +31,7 @@ int GetRequestId(const IPC::Message& msg) {
case ResourceHostMsg_DidChangePriority::ID:
case ResourceHostMsg_ReleaseDownloadedFile::ID:
case ResourceHostMsg_CancelRequest::ID:
- if (!PickleIterator(msg).ReadInt(&request_id))
+ if (!base::PickleIterator(msg).ReadInt(&request_id))
NOTREACHED() << "Invalid id for resource message.";
break;
@@ -172,7 +172,7 @@ class ResourceDispatchThrottlerTest : public testing::Test, public IPC::Sender {
int routing_id = -1;
int request_id = -1;
- PickleIterator iter(*msg);
+ base::PickleIterator iter(*msg);
CHECK(IPC::ReadParam(msg, &iter, &routing_id));
CHECK(IPC::ReadParam(msg, &iter, &request_id));
return request_id;
diff --git a/content/renderer/service_worker/embedded_worker_context_message_filter.cc b/content/renderer/service_worker/embedded_worker_context_message_filter.cc
index 4ecaa17..03120e1 100644
--- a/content/renderer/service_worker/embedded_worker_context_message_filter.cc
+++ b/content/renderer/service_worker/embedded_worker_context_message_filter.cc
@@ -35,7 +35,7 @@ void EmbeddedWorkerContextMessageFilter::OnFilteredMessageReceived(
bool EmbeddedWorkerContextMessageFilter::GetWorkerThreadIdForMessage(
const IPC::Message& msg,
int* ipc_thread_id) {
- return PickleIterator(msg).ReadInt(ipc_thread_id);
+ return base::PickleIterator(msg).ReadInt(ipc_thread_id);
}
} // namespace content
diff --git a/content/zygote/zygote_linux.cc b/content/zygote/zygote_linux.cc
index d4bf8c0..59a14c1 100644
--- a/content/zygote/zygote_linux.cc
+++ b/content/zygote/zygote_linux.cc
@@ -195,8 +195,8 @@ bool Zygote::HandleRequestFromBrowser(int fd) {
return false;
}
- Pickle pickle(buf, len);
- PickleIterator iter(pickle);
+ base::Pickle pickle(buf, len);
+ base::PickleIterator iter(pickle);
int kind;
if (iter.ReadInt(&kind)) {
@@ -236,8 +236,7 @@ bool Zygote::HandleRequestFromBrowser(int fd) {
}
// TODO(jln): remove callers to this broken API. See crbug.com/274855.
-void Zygote::HandleReapRequest(int fd,
- PickleIterator iter) {
+void Zygote::HandleReapRequest(int fd, base::PickleIterator iter) {
base::ProcessId child;
if (!iter.ReadInt(&child)) {
@@ -324,8 +323,7 @@ bool Zygote::GetTerminationStatus(base::ProcessHandle real_pid,
return true;
}
-void Zygote::HandleGetTerminationStatus(int fd,
- PickleIterator iter) {
+void Zygote::HandleGetTerminationStatus(int fd, base::PickleIterator iter) {
bool known_dead;
base::ProcessHandle child_requested;
@@ -348,7 +346,7 @@ void Zygote::HandleGetTerminationStatus(int fd,
exit_code = RESULT_CODE_NORMAL_EXIT;
}
- Pickle write_pickle;
+ base::Pickle write_pickle;
write_pickle.WriteInt(static_cast<int>(status));
write_pickle.WriteInt(exit_code);
ssize_t written =
@@ -461,8 +459,8 @@ int Zygote::ForkWithRealPid(const std::string& process_type,
CHECK_GT(len, 0);
CHECK(recv_fds.empty());
- Pickle pickle(buf, len);
- PickleIterator iter(pickle);
+ base::Pickle pickle(buf, len);
+ base::PickleIterator iter(pickle);
int kind;
CHECK(iter.ReadInt(&kind));
@@ -503,7 +501,7 @@ int Zygote::ForkWithRealPid(const std::string& process_type,
return real_pid;
}
-base::ProcessId Zygote::ReadArgsAndFork(PickleIterator iter,
+base::ProcessId Zygote::ReadArgsAndFork(base::PickleIterator iter,
ScopedVector<base::ScopedFD> fds,
std::string* uma_name,
int* uma_sample,
@@ -589,7 +587,7 @@ base::ProcessId Zygote::ReadArgsAndFork(PickleIterator iter,
}
bool Zygote::HandleForkRequest(int fd,
- PickleIterator iter,
+ base::PickleIterator iter,
ScopedVector<base::ScopedFD> fds) {
std::string uma_name;
int uma_sample;
@@ -605,7 +603,7 @@ bool Zygote::HandleForkRequest(int fd,
&uma_name, &uma_sample, &uma_boundary_value);
}
// Must always send reply, as ZygoteHost blocks while waiting for it.
- Pickle reply_pickle;
+ base::Pickle reply_pickle;
reply_pickle.WriteInt(child_pid);
reply_pickle.WriteString(uma_name);
if (!uma_name.empty()) {
@@ -618,8 +616,7 @@ bool Zygote::HandleForkRequest(int fd,
return false;
}
-bool Zygote::HandleGetSandboxStatus(int fd,
- PickleIterator iter) {
+bool Zygote::HandleGetSandboxStatus(int fd, base::PickleIterator iter) {
if (HANDLE_EINTR(write(fd, &sandbox_flags_, sizeof(sandbox_flags_))) !=
sizeof(sandbox_flags_)) {
PLOG(ERROR) << "write";
diff --git a/content/zygote/zygote_main_linux.cc b/content/zygote/zygote_main_linux.cc
index 5982f05..6562dc3 100644
--- a/content/zygote/zygote_main_linux.cc
+++ b/content/zygote/zygote_main_linux.cc
@@ -93,7 +93,7 @@ void RunTwoClosures(const base::Closure* first, const base::Closure* second) {
static void ProxyLocaltimeCallToBrowser(time_t input, struct tm* output,
char* timezone_out,
size_t timezone_out_len) {
- Pickle request;
+ base::Pickle request;
request.WriteInt(LinuxSandbox::METHOD_LOCALTIME);
request.WriteString(
std::string(reinterpret_cast<char*>(&input), sizeof(input)));
@@ -106,8 +106,8 @@ static void ProxyLocaltimeCallToBrowser(time_t input, struct tm* output,
return;
}
- Pickle reply(reinterpret_cast<char*>(reply_buf), r);
- PickleIterator iter(reply);
+ base::Pickle reply(reinterpret_cast<char*>(reply_buf), r);
+ base::PickleIterator iter(reply);
std::string result, timezone;
if (!iter.ReadString(&result) ||
!iter.ReadString(&timezone) ||