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

Unified Diff: content/child/web_data_consumer_handle_impl.h

Issue 2177243002: Use per-frame TaskRunner instead of thread's default in DataConsumerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@data_consumer_handle_unique_ptr
Patch Set: update Created 4 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
Index: content/child/web_data_consumer_handle_impl.h
diff --git a/content/child/web_data_consumer_handle_impl.h b/content/child/web_data_consumer_handle_impl.h
index 1c93bcd5e5280ecf8e927895798ea4613e11c299..58bf441d27d344a5bb1369d894d66990d05ca3a3 100644
--- a/content/child/web_data_consumer_handle_impl.h
+++ b/content/child/web_data_consumer_handle_impl.h
@@ -9,11 +9,16 @@
#include <memory>
+#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
#include "mojo/public/cpp/system/data_pipe.h"
#include "mojo/public/cpp/system/watcher.h"
#include "third_party/WebKit/public/platform/WebDataConsumerHandle.h"
+namespace base {
+class SingleThreadTaskRunner;
+}
+
namespace content {
class CONTENT_EXPORT WebDataConsumerHandleImpl final
@@ -24,7 +29,8 @@ class CONTENT_EXPORT WebDataConsumerHandleImpl final
public:
class CONTENT_EXPORT ReaderImpl final : public NON_EXPORTED_BASE(Reader) {
public:
- ReaderImpl(scoped_refptr<Context> context, Client* client);
+ ReaderImpl(scoped_refptr<Context> context, Client* client,
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner);
~ReaderImpl() override;
Result read(void* data,
size_t size,
@@ -44,7 +50,9 @@ class CONTENT_EXPORT WebDataConsumerHandleImpl final
mojo::Watcher handle_watcher_;
Client* client_;
};
- std::unique_ptr<Reader> obtainReader(Client* client) override;
+ std::unique_ptr<Reader> obtainReader(
+ Client* client,
+ std::unique_ptr<blink::WebTaskRunner> readerTaskRunner) override;
explicit WebDataConsumerHandleImpl(Handle handle);
~WebDataConsumerHandleImpl() override;

Powered by Google App Engine
This is Rietveld 408576698