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

Unified Diff: chrome/browser/devtools/device/android_web_socket.cc

Issue 1030263002: favor DCHECK_CURRENTLY_ON for better logs in chrome/browser/devtools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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: chrome/browser/devtools/device/android_web_socket.cc
diff --git a/chrome/browser/devtools/device/android_web_socket.cc b/chrome/browser/devtools/device/android_web_socket.cc
index e5c29b57e2cf2e4004b0c46ccafca4be670eabd8..84eea201d2b557555dc1ca2538f57e0e1cdef57b 100644
--- a/chrome/browser/devtools/device/android_web_socket.cc
+++ b/chrome/browser/devtools/device/android_web_socket.cc
@@ -140,7 +140,7 @@ AndroidDeviceManager::AndroidWebSocket::AndroidWebSocket(
socket_impl_(nullptr),
delegate_(delegate),
weak_factory_(this) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(delegate_);
DCHECK(device_);
device_->sockets_.insert(this);
@@ -150,13 +150,13 @@ AndroidDeviceManager::AndroidWebSocket::AndroidWebSocket(
}
AndroidDeviceManager::AndroidWebSocket::~AndroidWebSocket() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
Terminate();
}
void AndroidDeviceManager::AndroidWebSocket::SendFrame(
const std::string& message) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(socket_impl_);
DCHECK(device_);
device_->message_loop_proxy_->PostTask(
@@ -169,7 +169,7 @@ void AndroidDeviceManager::AndroidWebSocket::Connected(
int result,
const std::string& extensions,
scoped_ptr<net::StreamSocket> socket) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (result != net::OK || !socket.get()) {
OnSocketClosed();
return;
@@ -187,18 +187,18 @@ void AndroidDeviceManager::AndroidWebSocket::Connected(
void AndroidDeviceManager::AndroidWebSocket::OnFrameRead(
const std::string& message) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
delegate_->OnFrameRead(message);
}
void AndroidDeviceManager::AndroidWebSocket::OnSocketClosed() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
Terminate();
delegate_->OnSocketClosed();
}
void AndroidDeviceManager::AndroidWebSocket::Terminate() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (socket_impl_) {
DCHECK(device_);
device_->message_loop_proxy_->DeleteSoon(FROM_HERE, socket_impl_);
« no previous file with comments | « chrome/browser/devtools/device/android_device_manager.cc ('k') | chrome/browser/devtools/device/devtools_android_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698