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

Unified Diff: chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc

Issue 1060033003: [chrome/browser/safe_browsing] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit test break now 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 | « chrome/browser/safe_browsing/safe_browsing_service.cc ('k') | chrome/browser/safe_browsing/ui_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc
diff --git a/chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc b/chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc
index f23a7241661107837fc78c409f85e77319649b6c..417f4cd872b97807134e251b2c4f69ca67f133ae 100644
--- a/chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc
+++ b/chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc
@@ -34,7 +34,7 @@ SandboxedZipAnalyzer::SandboxedZipAnalyzer(
}
void SandboxedZipAnalyzer::Start() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Starting the analyzer will block on opening the zip file, so run this
// on a worker thread. The task does not need to block shutdown.
if (!BrowserThread::GetBlockingPool()->PostWorkerTaskWithShutdownBehavior(
@@ -112,7 +112,7 @@ bool SandboxedZipAnalyzer::OnMessageReceived(const IPC::Message& message) {
}
void SandboxedZipAnalyzer::StartProcessOnIOThread() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
utility_process_host_ = content::UtilityProcessHost::Create(
this,
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get())
@@ -125,7 +125,7 @@ void SandboxedZipAnalyzer::StartProcessOnIOThread() {
}
void SandboxedZipAnalyzer::OnUtilityProcessStarted() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
base::ProcessHandle utility_process =
content::RenderProcessHost::run_renderer_in_process() ?
base::GetCurrentProcessHandle() :
@@ -144,7 +144,7 @@ void SandboxedZipAnalyzer::OnUtilityProcessStarted() {
void SandboxedZipAnalyzer::OnAnalyzeZipFileFinished(
const zip_analyzer::Results& results) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (callback_called_)
return;
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service.cc ('k') | chrome/browser/safe_browsing/ui_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698