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

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

Issue 1159623009: content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test build fix. Created 5 years, 6 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/browser/download/drag_download_file.cc
diff --git a/content/browser/download/drag_download_file.cc b/content/browser/download/drag_download_file.cc
index 13950a1e2aaefbe0905ae1018456fd975c3d8930..2014270e38c1a3190c6d034e8fe53c179d91431b 100644
--- a/content/browser/download/drag_download_file.cc
+++ b/content/browser/download/drag_download_file.cc
@@ -6,7 +6,8 @@
#include "base/bind.h"
#include "base/files/file.h"
-#include "base/message_loop/message_loop.h"
+#include "base/location.h"
+#include "base/single_thread_task_runner.h"
#include "content/browser/download/download_stats.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/browser_context.h"
@@ -94,7 +95,8 @@ class DragDownloadFile::DragDownloadFileUI : public DownloadItem::Observer {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!item) {
DCHECK_NE(DOWNLOAD_INTERRUPT_REASON_NONE, interrupt_reason);
- on_completed_loop_->PostTask(FROM_HERE, base::Bind(on_completed_, false));
+ on_completed_loop_->task_runner()->PostTask(
+ FROM_HERE, base::Bind(on_completed_, false));
return;
}
DCHECK_EQ(DOWNLOAD_INTERRUPT_REASON_NONE, interrupt_reason);
@@ -111,8 +113,9 @@ class DragDownloadFile::DragDownloadFileUI : public DownloadItem::Observer {
state == DownloadItem::CANCELLED ||
state == DownloadItem::INTERRUPTED) {
if (!on_completed_.is_null()) {
- on_completed_loop_->PostTask(FROM_HERE, base::Bind(
- on_completed_, state == DownloadItem::COMPLETE));
+ on_completed_loop_->task_runner()->PostTask(
+ FROM_HERE,
+ base::Bind(on_completed_, state == DownloadItem::COMPLETE));
on_completed_.Reset();
}
download_item_->RemoveObserver(this);
@@ -127,8 +130,8 @@ class DragDownloadFile::DragDownloadFileUI : public DownloadItem::Observer {
if (!on_completed_.is_null()) {
const bool is_complete =
download_item_->GetState() == DownloadItem::COMPLETE;
- on_completed_loop_->PostTask(FROM_HERE, base::Bind(
- on_completed_, is_complete));
+ on_completed_loop_->task_runner()->PostTask(
+ FROM_HERE, base::Bind(on_completed_, is_complete));
on_completed_.Reset();
}
download_item_->RemoveObserver(this);
« no previous file with comments | « content/browser/download/download_resource_handler.cc ('k') | content/browser/fileapi/blob_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698