diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-01 04:33:17 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-01 04:33:17 +0000 |
commit | f9d8a772bb120d9e4a311c8fb72553d3356a6a3a (patch) | |
tree | 3e9cfc6461e6df6d318774a5fabf82ab05dbad27 /remoting/base | |
parent | 83501baf7d4e148982f9068fbca4379ccf983540 (diff) | |
download | chromium_src-f9d8a772bb120d9e4a311c8fb72553d3356a6a3a.zip chromium_src-f9d8a772bb120d9e4a311c8fb72553d3356a6a3a.tar.gz chromium_src-f9d8a772bb120d9e4a311c8fb72553d3356a6a3a.tar.bz2 |
Update remoting/ and jingle/ to use scoped_refptr<T>::get() rather than implicit "operator T*"
Linux fixes
BUG=110610
TBR=darin
Review URL: https://chromiumcodereview.appspot.com/15782010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203573 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/base')
-rw-r--r-- | remoting/base/auto_thread.cc | 11 | ||||
-rw-r--r-- | remoting/base/compound_buffer.cc | 4 | ||||
-rw-r--r-- | remoting/base/compound_buffer_unittest.cc | 4 | ||||
-rw-r--r-- | remoting/base/rsa_key_pair.cc | 2 | ||||
-rw-r--r-- | remoting/base/rsa_key_pair_unittest.cc | 2 | ||||
-rw-r--r-- | remoting/base/socket_reader.cc | 5 |
6 files changed, 15 insertions, 13 deletions
diff --git a/remoting/base/auto_thread.cc b/remoting/base/auto_thread.cc index 9890bc3..b1d0279 100644 --- a/remoting/base/auto_thread.cc +++ b/remoting/base/auto_thread.cc @@ -57,9 +57,9 @@ scoped_refptr<AutoThreadTaskRunner> AutoThread::CreateWithType( const char* name, scoped_refptr<AutoThreadTaskRunner> joiner, base::MessageLoop::Type type) { - AutoThread* thread = new AutoThread(name, joiner); + AutoThread* thread = new AutoThread(name, joiner.get()); scoped_refptr<AutoThreadTaskRunner> task_runner = thread->StartWithType(type); - if (!task_runner) + if (!task_runner.get()) delete thread; return task_runner; } @@ -167,9 +167,10 @@ void AutoThread::QuitThread( base::MessageLoop::current()->Quit(); was_quit_properly_ = true; - if (joiner_) { - joiner_->PostTask(FROM_HERE, base::Bind(&AutoThread::JoinAndDeleteThread, - base::Unretained(this))); + if (joiner_.get()) { + joiner_->PostTask( + FROM_HERE, + base::Bind(&AutoThread::JoinAndDeleteThread, base::Unretained(this))); } } diff --git a/remoting/base/compound_buffer.cc b/remoting/base/compound_buffer.cc index 049ad8e..79b4d32 100644 --- a/remoting/base/compound_buffer.cc +++ b/remoting/base/compound_buffer.cc @@ -52,7 +52,7 @@ void CompoundBuffer::Append(net::IOBuffer* buffer, int size) { void CompoundBuffer::Append(const CompoundBuffer& buffer) { for (DataChunkList::const_iterator it = buffer.chunks_.begin(); it != buffer.chunks_.end(); ++it) { - Append(it->buffer, it->start, it->size); + Append(it->buffer.get(), it->start, it->size); } } @@ -75,7 +75,7 @@ void CompoundBuffer::Prepend(net::IOBuffer* buffer, int size) { void CompoundBuffer::Prepend(const CompoundBuffer& buffer) { for (DataChunkList::const_iterator it = buffer.chunks_.begin(); it != buffer.chunks_.end(); ++it) { - Prepend(it->buffer, it->start, it->size); + Prepend(it->buffer.get(), it->start, it->size); } } void CompoundBuffer::AppendCopyOf(const char* data, int size) { diff --git a/remoting/base/compound_buffer_unittest.cc b/remoting/base/compound_buffer_unittest.cc index 77cb484..c6dde77 100644 --- a/remoting/base/compound_buffer_unittest.cc +++ b/remoting/base/compound_buffer_unittest.cc @@ -35,7 +35,7 @@ class CompoundBufferTest : public testing::Test { // Following 5 methods are used with IterateOverPieces(). void Append(int pos, int size) { - target_.Append(data_, data_->data() + pos, size); + target_.Append(data_.get(), data_->data() + pos, size); } void AppendCopyOf(int pos, int size) { @@ -43,7 +43,7 @@ class CompoundBufferTest : public testing::Test { } void Prepend(int pos, int size) { - target_.Prepend(data_, data_->data() + kDataSize - pos - size, size); + target_.Prepend(data_.get(), data_->data() + kDataSize - pos - size, size); } void PrependCopyOf(int pos, int size) { diff --git a/remoting/base/rsa_key_pair.cc b/remoting/base/rsa_key_pair.cc index 95572f9..9f8b11f 100644 --- a/remoting/base/rsa_key_pair.cc +++ b/remoting/base/rsa_key_pair.cc @@ -97,7 +97,7 @@ std::string RsaKeyPair::GenerateCertificate() const { key_.get(), "CN=chromoting", base::RandInt(1, std::numeric_limits<int>::max()), base::TimeDelta::FromDays(1)); - if (!cert) + if (!cert.get()) return std::string(); std::string encoded; diff --git a/remoting/base/rsa_key_pair_unittest.cc b/remoting/base/rsa_key_pair_unittest.cc index 4b38659..cb3c426 100644 --- a/remoting/base/rsa_key_pair_unittest.cc +++ b/remoting/base/rsa_key_pair_unittest.cc @@ -75,7 +75,7 @@ TEST_F(RsaKeyPairTest, Signatures) { TEST_F(RsaKeyPairTest, GenerateKey) { // Test that we can generate a valid key. scoped_refptr<RsaKeyPair> key_pair = RsaKeyPair::Generate(); - ASSERT_TRUE(key_pair); + ASSERT_TRUE(key_pair.get()); ASSERT_NE(key_pair->ToString(), ""); ASSERT_NE(key_pair->GetPublicKey(), ""); ASSERT_NE(key_pair->SignMessage(kTestMessage), ""); diff --git a/remoting/base/socket_reader.cc b/remoting/base/socket_reader.cc index bc5b651..dbe5ba8 100644 --- a/remoting/base/socket_reader.cc +++ b/remoting/base/socket_reader.cc @@ -40,8 +40,9 @@ void SocketReader::DoRead() { while (true) { read_buffer_ = new net::IOBuffer(kReadBufferSize); int result = socket_->Read( - read_buffer_, kReadBufferSize, base::Bind(&SocketReader::OnRead, - weak_factory_.GetWeakPtr())); + read_buffer_.get(), + kReadBufferSize, + base::Bind(&SocketReader::OnRead, weak_factory_.GetWeakPtr())); HandleReadResult(result); if (result <= 0) break; |