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

Side by Side Diff: content/child/shared_memory_data_consumer_handle.cc

Issue 1958823002: Fix implicit access to raw pointer of scoped_refptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Splitting out change to scoped_refptr to follow up patch. Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/child/shared_memory_data_consumer_handle.h" 5 #include "content/child/shared_memory_data_consumer_handle.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 on_reader_detached_.Reset(); 156 on_reader_detached_.Reset();
157 } else { 157 } else {
158 // We need to reset |on_reader_detached_| on the right thread because it 158 // We need to reset |on_reader_detached_| on the right thread because it
159 // might lead to the object destruction. 159 // might lead to the object destruction.
160 writer_task_runner_->PostTask( 160 writer_task_runner_->PostTask(
161 FROM_HERE, base::Bind(&Context::ResetOnReaderDetachedWithLock, this)); 161 FROM_HERE, base::Bind(&Context::ResetOnReaderDetachedWithLock, this));
162 } 162 }
163 } 163 }
164 bool is_handle_locked() const { 164 bool is_handle_locked() const {
165 lock_.AssertAcquired(); 165 lock_.AssertAcquired();
166 return notification_task_runner_; 166 return static_cast<bool>(notification_task_runner_);
167 } 167 }
168 bool IsReaderBoundToCurrentThread() const { 168 bool IsReaderBoundToCurrentThread() const {
169 lock_.AssertAcquired(); 169 lock_.AssertAcquired();
170 return notification_task_runner_ && 170 return notification_task_runner_ &&
171 notification_task_runner_->BelongsToCurrentThread(); 171 notification_task_runner_->BelongsToCurrentThread();
172 } 172 }
173 bool is_handle_active() const { 173 bool is_handle_active() const {
174 lock_.AssertAcquired(); 174 lock_.AssertAcquired();
175 return is_handle_active_; 175 return is_handle_active_;
176 } 176 }
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 SharedMemoryDataConsumerHandle::ReaderImpl* 475 SharedMemoryDataConsumerHandle::ReaderImpl*
476 SharedMemoryDataConsumerHandle::obtainReaderInternal(Client* client) { 476 SharedMemoryDataConsumerHandle::obtainReaderInternal(Client* client) {
477 return new ReaderImpl(context_, client); 477 return new ReaderImpl(context_, client);
478 } 478 }
479 479
480 const char* SharedMemoryDataConsumerHandle::debugName() const { 480 const char* SharedMemoryDataConsumerHandle::debugName() const {
481 return "SharedMemoryDataConsumerHandle"; 481 return "SharedMemoryDataConsumerHandle";
482 } 482 }
483 483
484 } // namespace content 484 } // namespace content
OLDNEW
« no previous file with comments | « content/child/child_thread_impl.cc ('k') | content/renderer/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698