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

Unified Diff: chrome/nacl/nacl_ipc_adapter.cc

Issue 10069051: RefCounted types should not have public destructors, chrome/nacl edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implementation ordering Created 8 years, 8 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
« no previous file with comments | « chrome/nacl/nacl_ipc_adapter.h ('k') | chrome/nacl/nacl_listener.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
+}
« no previous file with comments | « chrome/nacl/nacl_ipc_adapter.h ('k') | chrome/nacl/nacl_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698