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

Unified Diff: content/child/web_url_loader_impl.h

Issue 2932453002: PlzNavigate: Release StreamHandle. (Closed)
Patch Set: Add real urls in tests ( rebase...) Created 3 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/child/web_url_loader_impl.h
diff --git a/content/child/web_url_loader_impl.h b/content/child/web_url_loader_impl.h
index a3825703dcfee6fbdb6f0917de9a4b874adfd6b0..6bb506d17152084e0b8782746cbc08a927a2d62e 100644
--- a/content/child/web_url_loader_impl.h
+++ b/content/child/web_url_loader_impl.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_
#define CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_
+#include "base/callback_forward.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
@@ -25,8 +26,7 @@ struct CONTENT_EXPORT StreamOverrideParameters {
public:
StreamOverrideParameters();
~StreamOverrideParameters();
- // TODO(clamy): The browser should be made aware on destruction of this struct
- // that it can release its associated stream handle.
+
GURL stream_url;
mojo::ScopedDataPipeConsumerHandle consumer_handle;
ResourceResponseHead response;
@@ -39,6 +39,10 @@ struct CONTENT_EXPORT StreamOverrideParameters {
int total_transfer_size_delta;
int total_transferred = 0;
+
+ // Called when this struct is deleted. Used to notify the browser that it can
+ // release its associated StreamHandle.
+ base::OnceCallback<void(const GURL&)> on_delete;
};
class CONTENT_EXPORT WebURLLoaderImpl
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl_browsertest.cc ('k') | content/child/web_url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698