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

Unified Diff: content/browser/download/base_file.cc

Issue 1008613002: favor DCHECK_CURRENTLY_ON for better logs in content/browser/[a-d]* (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
« no previous file with comments | « content/browser/devtools/worker_devtools_agent_host.cc ('k') | content/browser/download/base_file_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/base_file.cc
diff --git a/content/browser/download/base_file.cc b/content/browser/download/base_file.cc
index 5bca7831a4431422553e8ce7fc0647acd376c154..62ffe57fea2dd9ab6d0f9d8f3b3ce3b06605eb3e 100644
--- a/content/browser/download/base_file.cc
+++ b/content/browser/download/base_file.cc
@@ -55,7 +55,7 @@ BaseFile::BaseFile(const base::FilePath& full_path,
}
BaseFile::~BaseFile() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
if (detached_)
Close();
else
@@ -64,7 +64,7 @@ BaseFile::~BaseFile() {
DownloadInterruptReason BaseFile::Initialize(
const base::FilePath& default_directory) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
DCHECK(!detached_);
if (full_path_.empty()) {
@@ -90,7 +90,7 @@ DownloadInterruptReason BaseFile::Initialize(
DownloadInterruptReason BaseFile::AppendDataToFile(const char* data,
size_t data_len) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
DCHECK(!detached_);
// NOTE(benwells): The above DCHECK won't be present in release builds,
@@ -137,7 +137,7 @@ DownloadInterruptReason BaseFile::AppendDataToFile(const char* data,
}
DownloadInterruptReason BaseFile::Rename(const base::FilePath& new_path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
DownloadInterruptReason rename_result = DOWNLOAD_INTERRUPT_REASON_NONE;
// If the new path is same as the old one, there is no need to perform the
@@ -179,7 +179,7 @@ void BaseFile::Detach() {
}
void BaseFile::Cancel() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
DCHECK(!detached_);
bound_net_log_.AddEvent(net::NetLog::TYPE_CANCELLED);
@@ -195,7 +195,7 @@ void BaseFile::Cancel() {
}
void BaseFile::Finish() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
if (calculate_hash_)
secure_hash_->Finish(sha256_hash_, crypto::kSHA256Length);
@@ -251,7 +251,7 @@ std::string BaseFile::DebugString() const {
}
DownloadInterruptReason BaseFile::Open() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
DCHECK(!detached_);
DCHECK(!full_path_.empty());
@@ -297,7 +297,7 @@ DownloadInterruptReason BaseFile::Open() {
}
void BaseFile::Close() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
bound_net_log_.AddEvent(net::NetLog::TYPE_DOWNLOAD_FILE_CLOSED);
« no previous file with comments | « content/browser/devtools/worker_devtools_agent_host.cc ('k') | content/browser/download/base_file_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698