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

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

Issue 2890853002: Downloads: replace BrowserThread::FILE with task scheduler. (Closed)
Patch Set: Address Avi's comments. Created 3 years, 5 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/download/save_file.h ('k') | content/browser/download/save_file_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/save_file.cc
diff --git a/content/browser/download/save_file.cc b/content/browser/download/save_file.cc
index 56f968a2ed7150f2d2845835fb65c5847cb7ff40..a9b0aaee08cf5fb6ec87e13004dd6f5d76265e8a 100644
--- a/content/browser/download/save_file.cc
+++ b/content/browser/download/save_file.cc
@@ -5,7 +5,7 @@
#include "content/browser/download/save_file.h"
#include "base/logging.h"
-#include "content/public/browser/browser_thread.h"
+#include "content/browser/download/download_task_runner.h"
#include "net/log/net_log_with_source.h"
namespace content {
@@ -16,14 +16,14 @@ namespace content {
// have access to the SavePackage at this point.
SaveFile::SaveFile(const SaveFileCreateInfo* info, bool calculate_hash)
: file_(net::NetLogWithSource()), info_(info) {
- DCHECK_CURRENTLY_ON(BrowserThread::FILE);
+ DCHECK(GetDownloadTaskRunner()->RunsTasksInCurrentSequence());
DCHECK(info);
DCHECK(info->path.empty());
}
SaveFile::~SaveFile() {
- DCHECK_CURRENTLY_ON(BrowserThread::FILE);
+ DCHECK(GetDownloadTaskRunner()->RunsTasksInCurrentSequence());
}
DownloadInterruptReason SaveFile::Initialize() {
« no previous file with comments | « content/browser/download/save_file.h ('k') | content/browser/download/save_file_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698