summaryrefslogtreecommitdiffstats
path: root/content/common/cc_messages.cc
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-04 22:46:03 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-04 22:46:03 +0000
commit1aca0098c408047b8ddedfc306e8b8163b7b4ec2 (patch)
tree34e3cc762575da0f6a0243642a3a8d1dc3dc6773 /content/common/cc_messages.cc
parent35fb693d6565cf0435a11d238df29b62c5668315 (diff)
downloadchromium_src-1aca0098c408047b8ddedfc306e8b8163b7b4ec2.zip
chromium_src-1aca0098c408047b8ddedfc306e8b8163b7b4ec2.tar.gz
chromium_src-1aca0098c408047b8ddedfc306e8b8163b7b4ec2.tar.bz2
Move Mailbox from cc to gpu, and its traits to gpu/ipc
Mailbox is safer to IPC than coaxing it into a string, because otherwise we need to validate the size when coming from untrusted sources. This is to enable passing Mailbox through IPC without having to depend on cc. Among others I will need it to move Pepper to mailboxes, and pepper can't depend on cc. BUG=164095 Review URL: https://chromiumcodereview.appspot.com/12378053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186006 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/cc_messages.cc')
-rw-r--r--content/common/cc_messages.cc20
1 files changed, 0 insertions, 20 deletions
diff --git a/content/common/cc_messages.cc b/content/common/cc_messages.cc
index c61c812..799fa97 100644
--- a/content/common/cc_messages.cc
+++ b/content/common/cc_messages.cc
@@ -536,26 +536,6 @@ void ParamTraits<cc::RenderPass>::Log(
l->append("])");
}
-void ParamTraits<cc::Mailbox>::Write(Message* m, const param_type& p) {
- m->WriteBytes(p.name, sizeof(p.name));
-}
-
-bool ParamTraits<cc::Mailbox>::Read(const Message* m,
- PickleIterator* iter,
- param_type* p) {
- const char* bytes = NULL;
- if (!m->ReadBytes(iter, &bytes, sizeof(p->name)))
- return false;
- DCHECK(bytes);
- memcpy(p->name, bytes, sizeof(p->name));
- return true;
-}
-
-void ParamTraits<cc::Mailbox>::Log(const param_type& p, std::string* l) {
- for (size_t i = 0; i < sizeof(p.name); ++i)
- *l += base::StringPrintf("%02x", p.name[i]);
-}
-
namespace {
enum CompositorFrameType {
NO_FRAME,