summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2016-01-19 17:41:02 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-20 01:43:18 +0000
commit5d64b5269aa9293c992f41235290366d21cb38ac (patch)
tree2cf3091ddc052686b434d4a4f6d90cfd518d7004 /media
parentec933290454c4a92f9dd720fc38191f732bdfc7b (diff)
downloadchromium_src-5d64b5269aa9293c992f41235290366d21cb38ac.zip
chromium_src-5d64b5269aa9293c992f41235290366d21cb38ac.tar.gz
chromium_src-5d64b5269aa9293c992f41235290366d21cb38ac.tar.bz2
Fix remaining incompatibilities between scoped_ptr and unique_ptr.
scoped_ptr is more convertible to bool than std::unique_ptr. bool x = scoped_ptr<int>(); // compiles bool y = std::unique_ptr<int>(); // explodes std::unique_ptr is not streamable: LOG(ERROR) << scoped_ptr<int>(); // compiles LOG(ERROR) << std::unique_ptr<int>(); // explodes BUG=579269,579270 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1609923002 Cr-Commit-Position: refs/heads/master@{#370266}
Diffstat (limited to 'media')
-rw-r--r--media/audio/sounds/audio_stream_handler.cc2
-rw-r--r--media/base/bind_to_current_loop_unittest.cc2
-rw-r--r--media/base/pipeline.cc2
-rw-r--r--media/blink/buffered_resource_loader_unittest.cc2
-rw-r--r--media/filters/decoder_stream.cc2
5 files changed, 5 insertions, 5 deletions
diff --git a/media/audio/sounds/audio_stream_handler.cc b/media/audio/sounds/audio_stream_handler.cc
index 62235c9..56d1b94 100644
--- a/media/audio/sounds/audio_stream_handler.cc
+++ b/media/audio/sounds/audio_stream_handler.cc
@@ -204,7 +204,7 @@ AudioStreamHandler::~AudioStreamHandler() {
bool AudioStreamHandler::IsInitialized() const {
DCHECK(CalledOnValidThread());
- return stream_;
+ return !!stream_;
}
bool AudioStreamHandler::Play() {
diff --git a/media/base/bind_to_current_loop_unittest.cc b/media/base/bind_to_current_loop_unittest.cc
index 7fb56d4..abb3081 100644
--- a/media/base/bind_to_current_loop_unittest.cc
+++ b/media/base/bind_to_current_loop_unittest.cc
@@ -23,7 +23,7 @@ void BoundBoolSetFromScopedPtr(bool* var, scoped_ptr<bool> val) {
void BoundBoolSetFromScopedPtrFreeDeleter(
bool* var,
scoped_ptr<bool, base::FreeDeleter> val) {
- *var = val;
+ *var = *val;
}
void BoundBoolSetFromScopedArray(bool* var, scoped_ptr<bool[]> val) {
diff --git a/media/base/pipeline.cc b/media/base/pipeline.cc
index 867d630..a548b64 100644
--- a/media/base/pipeline.cc
+++ b/media/base/pipeline.cc
@@ -821,7 +821,7 @@ void Pipeline::OnAddTextTrack(const TextTrackConfig& config,
void Pipeline::InitializeDemuxer(const PipelineStatusCB& done_cb) {
DCHECK(task_runner_->BelongsToCurrentThread());
- demuxer_->Initialize(this, done_cb, text_renderer_);
+ demuxer_->Initialize(this, done_cb, !!text_renderer_);
}
void Pipeline::InitializeRenderer(const PipelineStatusCB& done_cb) {
diff --git a/media/blink/buffered_resource_loader_unittest.cc b/media/blink/buffered_resource_loader_unittest.cc
index 3065291..4c74611 100644
--- a/media/blink/buffered_resource_loader_unittest.cc
+++ b/media/blink/buffered_resource_loader_unittest.cc
@@ -292,7 +292,7 @@ class BufferedResourceLoaderTest : public testing::Test {
EXPECT_LE(loader_->buffer_.backward_capacity(), kMaxBufferCapacity);
}
- bool HasActiveLoader() { return loader_->active_loader_; }
+ bool HasActiveLoader() { return !!loader_->active_loader_; }
MOCK_METHOD1(StartCallback, void(BufferedResourceLoader::Status));
MOCK_METHOD2(ReadCallback, void(BufferedResourceLoader::Status, int));
diff --git a/media/filters/decoder_stream.cc b/media/filters/decoder_stream.cc
index 52f9458..8490b23 100644
--- a/media/filters/decoder_stream.cc
+++ b/media/filters/decoder_stream.cc
@@ -274,7 +274,7 @@ void DecoderStream<StreamType>::OnDecoderSelected(
}
media_log_->SetBooleanProperty(GetStreamTypeString() + "_dds",
- decrypting_demuxer_stream_);
+ !!decrypting_demuxer_stream_);
media_log_->SetStringProperty(GetStreamTypeString() + "_decoder",
decoder_->GetDisplayName());