summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranujk.sharma <anujk.sharma@samsung.com>2015-04-20 20:10:21 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-21 03:10:43 +0000
commit34e31a3304700639296125e481bc2cc63e77d348 (patch)
tree5ce9d4fadae41d3068a967adafda5689ab33065a
parentba75ded669862381ab3885197562fe05982df6ad (diff)
downloadchromium_src-34e31a3304700639296125e481bc2cc63e77d348.zip
chromium_src-34e31a3304700639296125e481bc2cc63e77d348.tar.gz
chromium_src-34e31a3304700639296125e481bc2cc63e77d348.tar.bz2
favor DCHECK_CURRENTLY_ON for better logs in extensions/
BUG=466848 Review URL: https://codereview.chromium.org/1059973004 Cr-Commit-Position: refs/heads/master@{#325974}
-rw-r--r--extensions/browser/api/bluetooth/bluetooth_event_router.cc6
-rw-r--r--extensions/browser/api/bluetooth_socket/bluetooth_socket_api.cc2
-rw-r--r--extensions/browser/api/socket/tls_socket.cc2
-rw-r--r--extensions/browser/api/sockets_tcp/sockets_tcp_api.cc4
-rw-r--r--extensions/browser/guest_view/web_view/web_view_guest.cc2
-rw-r--r--extensions/shell/browser/shell_browser_context.cc2
-rw-r--r--extensions/shell/browser/shell_oauth2_token_service.cc4
7 files changed, 11 insertions, 11 deletions
diff --git a/extensions/browser/api/bluetooth/bluetooth_event_router.cc b/extensions/browser/api/bluetooth/bluetooth_event_router.cc
index d7f4844..e603b90 100644
--- a/extensions/browser/api/bluetooth/bluetooth_event_router.cc
+++ b/extensions/browser/api/bluetooth/bluetooth_event_router.cc
@@ -42,7 +42,7 @@ BluetoothEventRouter::BluetoothEventRouter(content::BrowserContext* context)
num_event_listeners_(0),
extension_registry_observer_(this),
weak_ptr_factory_(this) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK(browser_context_);
registrar_.Add(this,
extensions::NOTIFICATION_EXTENSION_HOST_DESTROYED,
@@ -51,7 +51,7 @@ BluetoothEventRouter::BluetoothEventRouter(content::BrowserContext* context)
}
BluetoothEventRouter::~BluetoothEventRouter() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (adapter_.get()) {
adapter_->RemoveObserver(this);
adapter_ = NULL;
@@ -225,7 +225,7 @@ void BluetoothEventRouter::RemovePairingDelegate(
void BluetoothEventRouter::AdapterPresentChanged(
device::BluetoothAdapter* adapter,
bool present) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (adapter != adapter_.get()) {
DVLOG(1) << "Ignoring event for adapter " << adapter->GetAddress();
return;
diff --git a/extensions/browser/api/bluetooth_socket/bluetooth_socket_api.cc b/extensions/browser/api/bluetooth_socket/bluetooth_socket_api.cc
index c9c70b9..f791c96 100644
--- a/extensions/browser/api/bluetooth_socket/bluetooth_socket_api.cc
+++ b/extensions/browser/api/bluetooth_socket/bluetooth_socket_api.cc
@@ -37,7 +37,7 @@ const char kSocketNotFoundError[] = "Socket not found";
linked_ptr<SocketInfo> CreateSocketInfo(int socket_id,
BluetoothApiSocket* socket) {
- DCHECK(BrowserThread::CurrentlyOn(BluetoothApiSocket::kThreadId));
+ DCHECK_CURRENTLY_ON(BluetoothApiSocket::kThreadId);
linked_ptr<SocketInfo> socket_info(new SocketInfo());
// This represents what we know about the socket, and does not call through
// to the system.
diff --git a/extensions/browser/api/socket/tls_socket.cc b/extensions/browser/api/socket/tls_socket.cc
index 9115c73..9ee15ed 100644
--- a/extensions/browser/api/socket/tls_socket.cc
+++ b/extensions/browser/api/socket/tls_socket.cc
@@ -184,7 +184,7 @@ void TLSSocket::UpgradeSocketToTLS(
const std::string& extension_id,
core_api::socket::SecureOptions* options,
const TLSSocket::SecureCallback& callback) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
TCPSocket* tcp_socket = static_cast<TCPSocket*>(socket);
scoped_ptr<net::SSLClientSocket> null_sock;
diff --git a/extensions/browser/api/sockets_tcp/sockets_tcp_api.cc b/extensions/browser/api/sockets_tcp/sockets_tcp_api.cc
index 6a7204c..f9e87ec 100644
--- a/extensions/browser/api/sockets_tcp/sockets_tcp_api.cc
+++ b/extensions/browser/api/sockets_tcp/sockets_tcp_api.cc
@@ -457,7 +457,7 @@ SocketsTcpSecureFunction::~SocketsTcpSecureFunction() {
}
bool SocketsTcpSecureFunction::Prepare() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
params_ = core_api::sockets_tcp::Secure::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_.get());
url_request_getter_ = browser_context()->GetRequestContext();
@@ -467,7 +467,7 @@ bool SocketsTcpSecureFunction::Prepare() {
// Override the regular implementation, which would call AsyncWorkCompleted
// immediately after Work().
void SocketsTcpSecureFunction::AsyncWorkStart() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
ResumableTCPSocket* socket = GetTcpSocket(params_->socket_id);
if (!socket) {
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.cc b/extensions/browser/guest_view/web_view/web_view_guest.cc
index c0fbbb3..ba6cb76 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.cc
+++ b/extensions/browser/guest_view/web_view/web_view_guest.cc
@@ -164,7 +164,7 @@ void RemoveWebViewEventListenersOnIOThread(
const std::string& extension_id,
int embedder_process_id,
int view_instance_id) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
ExtensionWebRequestEventRouter::GetInstance()->RemoveWebViewEventListeners(
profile,
extension_id,
diff --git a/extensions/shell/browser/shell_browser_context.cc b/extensions/shell/browser/shell_browser_context.cc
index 0c937d1..61aec77 100644
--- a/extensions/shell/browser/shell_browser_context.cc
+++ b/extensions/shell/browser/shell_browser_context.cc
@@ -72,7 +72,7 @@ net::URLRequestContextGetter* ShellBrowserContext::CreateRequestContext(
}
void ShellBrowserContext::InitURLRequestContextOnIOThread() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
// GetURLRequestContext() will create a URLRequestContext if it isn't
// initialized.
diff --git a/extensions/shell/browser/shell_oauth2_token_service.cc b/extensions/shell/browser/shell_oauth2_token_service.cc
index 53ed2fe4..a742255 100644
--- a/extensions/shell/browser/shell_oauth2_token_service.cc
+++ b/extensions/shell/browser/shell_oauth2_token_service.cc
@@ -23,13 +23,13 @@ ShellOAuth2TokenService::ShellOAuth2TokenService(
: browser_context_(browser_context),
account_id_(account_id),
refresh_token_(refresh_token) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK(!g_instance);
g_instance = this;
}
ShellOAuth2TokenService::~ShellOAuth2TokenService() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK(g_instance);
g_instance = nullptr;
}