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

Unified Diff: chrome/browser/devtools/device/webrtc/devtools_bridge_client.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/webrtc/devtools_bridge_client.cc
diff --git a/chrome/browser/devtools/device/webrtc/devtools_bridge_client.cc b/chrome/browser/devtools/device/webrtc/devtools_bridge_client.cc
index 055b8040196e944150eb1d5337373bbed7b40a35..99af8a05c12f1c7df23ec5f1d664a6a40b912657 100644
--- a/chrome/browser/devtools/device/webrtc/devtools_bridge_client.cc
+++ b/chrome/browser/devtools/device/webrtc/devtools_bridge_client.cc
@@ -52,7 +52,7 @@ base::WeakPtr<DevToolsBridgeClient> DevToolsBridgeClient::Create(
Profile* profile,
SigninManagerBase* signin_manager,
ProfileOAuth2TokenService* token_service) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
auto instance =
new DevToolsBridgeClient(profile, signin_manager, token_service);
return instance->weak_factory_.GetWeakPtr();
@@ -67,7 +67,7 @@ DevToolsBridgeClient::DevToolsBridgeClient(
identity_provider_(signin_manager, token_service, nullptr),
worker_is_loaded_(false),
weak_factory_(this) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
identity_provider_.AddObserver(this);
registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
@@ -78,13 +78,13 @@ DevToolsBridgeClient::DevToolsBridgeClient(
}
DevToolsBridgeClient::~DevToolsBridgeClient() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
identity_provider_.RemoveObserver(this);
}
void DevToolsBridgeClient::DeleteSelf() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
delete this;
}
@@ -178,7 +178,7 @@ DevToolsBridgeClient::DeviceInfo DevToolsBridgeClient::GetDeviceInfo(
}
void DevToolsBridgeClient::CreateBackgroundWorker() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
background_worker_.reset(
WebContents::Create(WebContents::CreateParams(profile_)));
@@ -204,19 +204,19 @@ void DevToolsBridgeClient::Observe(
int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type);
delete this;
}
void DevToolsBridgeClient::OnActiveAccountLogin() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
CreateBackgroundWorker();
}
void DevToolsBridgeClient::OnActiveAccountLogout() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
background_worker_.reset();
browser_list_request_.reset();
send_command_request_.reset();
« no previous file with comments | « chrome/browser/devtools/device/usb/android_usb_device.cc ('k') | chrome/browser/devtools/devtools_file_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698