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

Unified Diff: device/bluetooth/bluetooth_socket_net.cc

Issue 2891853003: Rename TaskRunner::RunsTasksOnCurrentThread() in //device, //services (Closed)
Patch Set: fixed build error Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/bluetooth/bluetooth_remote_gatt_service_win.cc ('k') | device/bluetooth/bluetooth_socket_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_socket_net.cc
diff --git a/device/bluetooth/bluetooth_socket_net.cc b/device/bluetooth/bluetooth_socket_net.cc
index 0be52c8d22594cd949c9b40559ded9cd84095390..e029f4d77635cfa19b2c60cda51ba79b4ab7b40d 100644
--- a/device/bluetooth/bluetooth_socket_net.cc
+++ b/device/bluetooth/bluetooth_socket_net.cc
@@ -44,7 +44,7 @@ BluetoothSocketNet::BluetoothSocketNet(
scoped_refptr<BluetoothSocketThread> socket_thread)
: ui_task_runner_(ui_task_runner),
socket_thread_(socket_thread) {
- DCHECK(ui_task_runner->RunsTasksOnCurrentThread());
+ DCHECK(ui_task_runner->RunsTasksInCurrentSequence());
socket_thread_->OnSocketActivate();
}
@@ -55,14 +55,14 @@ BluetoothSocketNet::~BluetoothSocketNet() {
}
void BluetoothSocketNet::Close() {
- DCHECK(ui_task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(ui_task_runner_->RunsTasksInCurrentSequence());
socket_thread_->task_runner()->PostTask(
FROM_HERE, base::Bind(&BluetoothSocketNet::DoClose, this));
}
void BluetoothSocketNet::Disconnect(
const base::Closure& success_callback) {
- DCHECK(ui_task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(ui_task_runner_->RunsTasksInCurrentSequence());
socket_thread_->task_runner()->PostTask(
FROM_HERE,
base::Bind(
@@ -77,7 +77,7 @@ void BluetoothSocketNet::Receive(
int buffer_size,
const ReceiveCompletionCallback& success_callback,
const ReceiveErrorCompletionCallback& error_callback) {
- DCHECK(ui_task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(ui_task_runner_->RunsTasksInCurrentSequence());
socket_thread_->task_runner()->PostTask(
FROM_HERE,
base::Bind(
@@ -97,7 +97,7 @@ void BluetoothSocketNet::Send(
int buffer_size,
const SendCompletionCallback& success_callback,
const ErrorCompletionCallback& error_callback) {
- DCHECK(ui_task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(ui_task_runner_->RunsTasksInCurrentSequence());
socket_thread_->task_runner()->PostTask(
FROM_HERE,
base::Bind(
@@ -136,7 +136,7 @@ void BluetoothSocketNet::PostErrorCompletion(
}
void BluetoothSocketNet::DoClose() {
- DCHECK(socket_thread_->task_runner()->RunsTasksOnCurrentThread());
+ DCHECK(socket_thread_->task_runner()->RunsTasksInCurrentSequence());
base::ThreadRestrictions::AssertIOAllowed();
if (tcp_socket_) {
@@ -155,7 +155,7 @@ void BluetoothSocketNet::DoClose() {
}
void BluetoothSocketNet::DoDisconnect(const base::Closure& callback) {
- DCHECK(socket_thread_->task_runner()->RunsTasksOnCurrentThread());
+ DCHECK(socket_thread_->task_runner()->RunsTasksInCurrentSequence());
base::ThreadRestrictions::AssertIOAllowed();
DoClose();
@@ -166,7 +166,7 @@ void BluetoothSocketNet::DoReceive(
int buffer_size,
const ReceiveCompletionCallback& success_callback,
const ReceiveErrorCompletionCallback& error_callback) {
- DCHECK(socket_thread_->task_runner()->RunsTasksOnCurrentThread());
+ DCHECK(socket_thread_->task_runner()->RunsTasksInCurrentSequence());
base::ThreadRestrictions::AssertIOAllowed();
if (!tcp_socket_) {
@@ -200,7 +200,7 @@ void BluetoothSocketNet::OnSocketReadComplete(
const ReceiveCompletionCallback& success_callback,
const ReceiveErrorCompletionCallback& error_callback,
int read_result) {
- DCHECK(socket_thread_->task_runner()->RunsTasksOnCurrentThread());
+ DCHECK(socket_thread_->task_runner()->RunsTasksInCurrentSequence());
base::ThreadRestrictions::AssertIOAllowed();
scoped_refptr<net::IOBufferWithSize> buffer;
@@ -223,7 +223,7 @@ void BluetoothSocketNet::DoSend(
int buffer_size,
const SendCompletionCallback& success_callback,
const ErrorCompletionCallback& error_callback) {
- DCHECK(socket_thread_->task_runner()->RunsTasksOnCurrentThread());
+ DCHECK(socket_thread_->task_runner()->RunsTasksInCurrentSequence());
base::ThreadRestrictions::AssertIOAllowed();
if (!tcp_socket_) {
@@ -244,7 +244,7 @@ void BluetoothSocketNet::DoSend(
}
void BluetoothSocketNet::SendFrontWriteRequest() {
- DCHECK(socket_thread_->task_runner()->RunsTasksOnCurrentThread());
+ DCHECK(socket_thread_->task_runner()->RunsTasksInCurrentSequence());
base::ThreadRestrictions::AssertIOAllowed();
if (!tcp_socket_)
@@ -270,7 +270,7 @@ void BluetoothSocketNet::OnSocketWriteComplete(
const SendCompletionCallback& success_callback,
const ErrorCompletionCallback& error_callback,
int send_result) {
- DCHECK(socket_thread_->task_runner()->RunsTasksOnCurrentThread());
+ DCHECK(socket_thread_->task_runner()->RunsTasksInCurrentSequence());
base::ThreadRestrictions::AssertIOAllowed();
write_queue_.pop();
« no previous file with comments | « device/bluetooth/bluetooth_remote_gatt_service_win.cc ('k') | device/bluetooth/bluetooth_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698