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

Unified Diff: content/shell/browser/shell_download_manager_delegate.cc

Issue 1010963002: favor DCHECK_CURRENTLY_ON for better logs in content/{public,shell,test}/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master 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: content/shell/browser/shell_download_manager_delegate.cc
diff --git a/content/shell/browser/shell_download_manager_delegate.cc b/content/shell/browser/shell_download_manager_delegate.cc
index 9f838784fbf4193c8a122f8ba25350a0d9b7b0d2..da4978ee419b25a575927c51f776f27cbc8e0e3b 100644
--- a/content/shell/browser/shell_download_manager_delegate.cc
+++ b/content/shell/browser/shell_download_manager_delegate.cc
@@ -59,7 +59,7 @@ void ShellDownloadManagerDelegate::Shutdown() {
bool ShellDownloadManagerDelegate::DetermineDownloadTarget(
DownloadItem* download,
const DownloadTargetCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// This assignment needs to be here because even at the call to
// SetDownloadManager, the system is not fully initialized.
if (default_download_path_.empty()) {
@@ -114,7 +114,7 @@ void ShellDownloadManagerDelegate::GenerateFilename(
const std::string& mime_type,
const base::FilePath& suggested_directory,
const FilenameDeterminedCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
base::FilePath generated_name = net::GenerateFileName(url,
content_disposition,
std::string(),
@@ -134,7 +134,7 @@ void ShellDownloadManagerDelegate::OnDownloadPathGenerated(
uint32 download_id,
const DownloadTargetCallback& callback,
const base::FilePath& suggested_path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (suppress_prompting_) {
// Testing exit.
callback.Run(suggested_path, DownloadItem::TARGET_DISPOSITION_OVERWRITE,
@@ -150,7 +150,7 @@ void ShellDownloadManagerDelegate::ChooseDownloadPath(
uint32 download_id,
const DownloadTargetCallback& callback,
const base::FilePath& suggested_path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DownloadItem* item = download_manager_->GetDownload(download_id);
if (!item || (item->GetState() != DownloadItem::IN_PROGRESS))
return;

Powered by Google App Engine
This is Rietveld 408576698