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

Unified Diff: content/browser/streams/stream.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
« no previous file with comments | « content/browser/storage_partition_impl_unittest.cc ('k') | content/browser/streams/stream_handle_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/streams/stream.cc
diff --git a/content/browser/streams/stream.cc b/content/browser/streams/stream.cc
index fb36ad9057a2e07bdc83635fde49bafc57ef0393..3f4ae68083eb3424f0389d40b247280daf126b0f 100644
--- a/content/browser/streams/stream.cc
+++ b/content/browser/streams/stream.cc
@@ -6,7 +6,8 @@
#include "base/bind.h"
#include "base/location.h"
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "base/values.h"
#include "content/browser/streams/stream_handle_impl.h"
#include "content/browser/streams/stream_read_observer.h"
@@ -35,11 +36,9 @@ Stream::Stream(StreamRegistry* registry,
write_observer_(write_observer),
stream_handle_(NULL),
weak_ptr_factory_(this) {
- CreateByteStream(base::MessageLoopProxy::current(),
- base::MessageLoopProxy::current(),
- kDeferSizeThreshold,
- &writer_,
- &reader_);
+ CreateByteStream(base::ThreadTaskRunnerHandle::Get(),
+ base::ThreadTaskRunnerHandle::Get(), kDeferSizeThreshold,
+ &writer_, &reader_);
// Setup callback for writing.
writer_->RegisterCallback(base::Bind(&Stream::OnSpaceAvailable,
@@ -122,7 +121,7 @@ void Stream::Finalize() {
writer_.reset();
// Continue asynchronously.
- base::MessageLoopProxy::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&Stream::OnDataAvailable, weak_ptr_factory_.GetWeakPtr()));
}
« no previous file with comments | « content/browser/storage_partition_impl_unittest.cc ('k') | content/browser/streams/stream_handle_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698