| 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);
|
|
|
|
|