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

Unified Diff: content/browser/loader/mojo_async_resource_handler.h

Issue 2738973002: Allow MojoAsyncResourceHandler::OnWillRead to complete asyncronously (Closed)
Patch Set: Merge Created 3 years, 9 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/loader/mojo_async_resource_handler.h
diff --git a/content/browser/loader/mojo_async_resource_handler.h b/content/browser/loader/mojo_async_resource_handler.h
index ce84d64bf100a441457cb5c8ae30d25f11d8ba6c..57198253f79079312d11140009f7688ffa53a51e 100644
--- a/content/browser/loader/mojo_async_resource_handler.h
+++ b/content/browser/loader/mojo_async_resource_handler.h
@@ -132,11 +132,19 @@ class CONTENT_EXPORT MojoAsyncResourceHandler
bool has_checked_for_sufficient_resources_ = false;
bool sent_received_response_message_ = false;
bool is_using_io_buffer_not_from_writer_ = false;
+ // True if OnWillRead was deferred, in order to wait to be able to allocate a
+ // buffer.
+ bool did_defer_on_will_read_ = false;
bool did_defer_on_writing_ = false;
bool did_defer_on_redirect_ = false;
base::TimeTicks response_started_ticks_;
int64_t reported_total_received_bytes_ = 0;
+ // Pointer to parent's information about the read buffer. Only non-null while
+ // OnWillRead is deferred.
+ scoped_refptr<net::IOBuffer>* parent_buffer_ = nullptr;
+ int* parent_buffer_size_ = nullptr;
+
mojo::SimpleWatcher handle_watcher_;
std::unique_ptr<mojom::URLLoader> url_loader_;
mojom::URLLoaderClientPtr url_loader_client_;
« no previous file with comments | « content/browser/loader/mock_resource_loader.cc ('k') | content/browser/loader/mojo_async_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698