| Index: chrome/nacl/nacl_ipc_adapter.cc
|
| diff --git a/chrome/nacl/nacl_ipc_adapter.cc b/chrome/nacl/nacl_ipc_adapter.cc
|
| index 8f13c577fb9730d9be2c78d140075189226c88ae..cf5ae2f5946dd9ee836e3e1298e61d0402d233c0 100644
|
| --- a/chrome/nacl/nacl_ipc_adapter.cc
|
| +++ b/chrome/nacl/nacl_ipc_adapter.cc
|
| @@ -57,6 +57,9 @@ class NaClIPCAdapter::RewrittenMessage
|
| int Read(char* dest_buffer, int dest_buffer_size);
|
|
|
| private:
|
| + friend class base::RefCounted<RewrittenMessage>;
|
| + ~RewrittenMessage() {}
|
| +
|
| scoped_array<char> data_;
|
| int data_len_;
|
|
|
| @@ -126,9 +129,6 @@ NaClIPCAdapter::NaClIPCAdapter(scoped_ptr<IPC::Channel> channel,
|
| io_thread_data_.channel_ = channel.Pass();
|
| }
|
|
|
| -NaClIPCAdapter::~NaClIPCAdapter() {
|
| -}
|
| -
|
| // Note that this message is controlled by the untrusted code. So we should be
|
| // skeptical of anything it contains and quick to give up if anything is fishy.
|
| int NaClIPCAdapter::Send(const char* input_data, size_t input_data_len) {
|
| @@ -255,6 +255,9 @@ void NaClIPCAdapter::OnChannelError() {
|
| CloseChannel();
|
| }
|
|
|
| +NaClIPCAdapter::~NaClIPCAdapter() {
|
| +}
|
| +
|
| int NaClIPCAdapter::LockedReceive(char* output_buffer, int output_buffer_size) {
|
| lock_.AssertAcquired();
|
|
|
| @@ -316,14 +319,6 @@ bool NaClIPCAdapter::SendCompleteMessage(const char* buffer,
|
| return true;
|
| }
|
|
|
| -void NaClIPCAdapter::CloseChannelOnIOThread() {
|
| - io_thread_data_.channel_->Close();
|
| -}
|
| -
|
| -void NaClIPCAdapter::SendMessageOnIOThread(scoped_ptr<IPC::Message> message) {
|
| - io_thread_data_.channel_->Send(message.release());
|
| -}
|
| -
|
| void NaClIPCAdapter::ClearToBeSent() {
|
| lock_.AssertAcquired();
|
|
|
| @@ -331,3 +326,11 @@ void NaClIPCAdapter::ClearToBeSent() {
|
| std::string empty;
|
| locked_data_.to_be_sent_.swap(empty);
|
| }
|
| +
|
| +void NaClIPCAdapter::CloseChannelOnIOThread() {
|
| + io_thread_data_.channel_->Close();
|
| +}
|
| +
|
| +void NaClIPCAdapter::SendMessageOnIOThread(scoped_ptr<IPC::Message> message) {
|
| + io_thread_data_.channel_->Send(message.release());
|
| +}
|
|
|