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

Unified Diff: extensions/browser/api/bluetooth/bluetooth_extension_function.cc

Issue 1032553009: favor DCHECK_CURRENTLY_ON for better logs in extensions/ (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: extensions/browser/api/bluetooth/bluetooth_extension_function.cc
diff --git a/extensions/browser/api/bluetooth/bluetooth_extension_function.cc b/extensions/browser/api/bluetooth/bluetooth_extension_function.cc
index 7a5eefe501f07174fc45f7d6895c07b24f74464f..b51b647a5272ae80168a8696a3eb2f52b14b4784 100644
--- a/extensions/browser/api/bluetooth/bluetooth_extension_function.cc
+++ b/extensions/browser/api/bluetooth/bluetooth_extension_function.cc
@@ -20,18 +20,18 @@ const char kPlatformNotSupported[] =
extensions::BluetoothEventRouter* GetEventRouter(
content::BrowserContext* context) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
return extensions::BluetoothAPI::Get(context)->event_router();
}
bool IsBluetoothSupported(content::BrowserContext* context) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
return GetEventRouter(context)->IsBluetoothSupported();
}
void GetAdapter(const device::BluetoothAdapterFactory::AdapterCallback callback,
content::BrowserContext* context) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
GetEventRouter(context)->GetAdapter(callback);
}
@@ -47,7 +47,7 @@ BluetoothExtensionFunction::~BluetoothExtensionFunction() {
}
bool BluetoothExtensionFunction::RunAsync() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!IsBluetoothSupported(browser_context())) {
SetError(kPlatformNotSupported);
@@ -61,7 +61,7 @@ bool BluetoothExtensionFunction::RunAsync() {
void BluetoothExtensionFunction::RunOnAdapterReady(
scoped_refptr<device::BluetoothAdapter> adapter) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DoWork(adapter);
}

Powered by Google App Engine
This is Rietveld 408576698