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

Unified Diff: media/cast/cast_environment.cc

Issue 506683002: Remove implicit conversions from scoped_refptr to T* in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
Index: media/cast/cast_environment.cc
diff --git a/media/cast/cast_environment.cc b/media/cast/cast_environment.cc
index 93eb8c72522fa28e5963b407cf1a0cd86bfb5d32..f22f0a4eca220bf1041baa3467ec0192f8f6f75a 100644
--- a/media/cast/cast_environment.cc
+++ b/media/cast/cast_environment.cc
@@ -34,7 +34,8 @@ CastEnvironment::CastEnvironment(
CastEnvironment::~CastEnvironment() {
// Logging must be deleted on the main thread.
- if (main_thread_proxy_ && !main_thread_proxy_->RunsTasksOnCurrentThread()) {
+ if (main_thread_proxy_.get() &&
+ !main_thread_proxy_->RunsTasksOnCurrentThread()) {
main_thread_proxy_->PostTask(
FROM_HERE,
base::Bind(&DeleteLoggingOnMainThread, base::Passed(&logging_)));
@@ -73,13 +74,13 @@ scoped_refptr<SingleThreadTaskRunner> CastEnvironment::GetTaskRunner(
bool CastEnvironment::CurrentlyOn(ThreadId identifier) {
switch (identifier) {
case CastEnvironment::MAIN:
- return main_thread_proxy_ &&
+ return main_thread_proxy_.get() &&
main_thread_proxy_->RunsTasksOnCurrentThread();
case CastEnvironment::AUDIO:
- return audio_thread_proxy_ &&
+ return audio_thread_proxy_.get() &&
audio_thread_proxy_->RunsTasksOnCurrentThread();
case CastEnvironment::VIDEO:
- return video_thread_proxy_ &&
+ return video_thread_proxy_.get() &&
video_thread_proxy_->RunsTasksOnCurrentThread();
default:
NOTREACHED() << "Invalid thread identifier";

Powered by Google App Engine
This is Rietveld 408576698