diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-30 22:35:27 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-30 22:35:27 +0000 |
commit | 73d96dc3c451af3e4347d96471d8bdd02ab02853 (patch) | |
tree | f983e222b916a204bb4928e797b1061ee4185321 /base/pickle.h | |
parent | c3f757f314b7a473e1b76bd2a3401d5599bebd7d (diff) | |
download | chromium_src-73d96dc3c451af3e4347d96471d8bdd02ab02853.zip chromium_src-73d96dc3c451af3e4347d96471d8bdd02ab02853.tar.gz chromium_src-73d96dc3c451af3e4347d96471d8bdd02ab02853.tar.bz2 |
Initial implementation of an IPC adapter to expose Chrome IPC to Native Client.
This provides an implementation of sendmsg and recvmsg approxinately to what we think NaCl will expose to Chrome. Since NaCl isn't ready yet in this regard, it's still a bit speculative. And there is no support for sending handles across which will be the tricky part.
TEST=included unit test
BUG=none
Review URL: https://chromiumcodereview.appspot.com/9863005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129981 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/pickle.h')
-rw-r--r-- | base/pickle.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/base/pickle.h b/base/pickle.h index baa20f6..2420f75 100644 --- a/base/pickle.h +++ b/base/pickle.h @@ -257,15 +257,16 @@ class BASE_EXPORT Pickle { return static_cast<const T*>(header_); } - protected: + // The payload is the pickle data immediately following the header. size_t payload_size() const { return header_->payload_size; } + const char* payload() const { + return reinterpret_cast<const char*>(header_) + header_size_; + } + protected: char* payload() { return reinterpret_cast<char*>(header_) + header_size_; } - const char* payload() const { - return reinterpret_cast<const char*>(header_) + header_size_; - } // Returns the address of the byte immediately following the currently valid // header + payload. |