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

Unified Diff: chrome/browser/task_management/providers/child_process_task_provider.cc

Issue 1095183004: [chrome/browser/t*] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding files Created 5 years, 8 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 | « no previous file | chrome/browser/themes/browser_theme_pack.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_management/providers/child_process_task_provider.cc
diff --git a/chrome/browser/task_management/providers/child_process_task_provider.cc b/chrome/browser/task_management/providers/child_process_task_provider.cc
index 59db47f347c2c675404de3eb9d9c3d11cce9bcc8..a6f2073a13280e0b396c10d7ec2446256927361f 100644
--- a/chrome/browser/task_management/providers/child_process_task_provider.cc
+++ b/chrome/browser/task_management/providers/child_process_task_provider.cc
@@ -24,7 +24,7 @@ namespace {
// |BrowserChildProcessObserver|.
scoped_ptr<std::vector<ChildProcessData>> CollectChildProcessData() {
// The |BrowserChildProcessHostIterator| must only be used on the IO thread.
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
scoped_ptr<std::vector<ChildProcessData>> child_processes(
new std::vector<ChildProcessData>());
@@ -55,7 +55,7 @@ ChildProcessTaskProvider::~ChildProcessTaskProvider() {
Task* ChildProcessTaskProvider::GetTaskOfUrlRequest(int origin_pid,
int child_id,
int route_id) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
auto itr = tasks_by_pid_.find(static_cast<base::ProcessId>(origin_pid));
if (itr == tasks_by_pid_.end())
return nullptr;
@@ -65,7 +65,7 @@ Task* ChildProcessTaskProvider::GetTaskOfUrlRequest(int origin_pid,
void ChildProcessTaskProvider::BrowserChildProcessHostConnected(
const content::ChildProcessData& data) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (data.handle == base::kNullProcessHandle)
return;
@@ -74,12 +74,12 @@ void ChildProcessTaskProvider::BrowserChildProcessHostConnected(
void ChildProcessTaskProvider::BrowserChildProcessHostDisconnected(
const content::ChildProcessData& data) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DeleteTask(data.handle);
}
void ChildProcessTaskProvider::StartUpdating() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(tasks_by_handle_.empty());
DCHECK(tasks_by_pid_.empty());
@@ -93,7 +93,7 @@ void ChildProcessTaskProvider::StartUpdating() {
}
void ChildProcessTaskProvider::StopUpdating() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// ChildProcessDataCollected() should never be called after this, and hence
// we must invalidate the weak pointers.
@@ -112,7 +112,7 @@ void ChildProcessTaskProvider::StopUpdating() {
void ChildProcessTaskProvider::ChildProcessDataCollected(
scoped_ptr<const std::vector<content::ChildProcessData>> child_processes) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
for (auto& process_data : *child_processes)
CreateTask(process_data);
« no previous file with comments | « no previous file | chrome/browser/themes/browser_theme_pack.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698