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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2900563002: Network service: Safe browsing check for sub-resources from renderer. (Closed)
Patch Set: . Created 3 years, 7 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/public/renderer/content_renderer_client.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 8d9e7c0db0551b5830c9461a41bb228b5e4cc4e0..e5aad5f38e6a1789797d2779efda75fad6afdab3 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -71,6 +71,7 @@
#include "content/common/swapped_out_messages.h"
#include "content/common/view_messages.h"
#include "content/common/worker_url_loader_factory_provider.mojom.h"
+#include "content/public/child/url_loader_throttle.h"
#include "content/public/common/appcache_info.h"
#include "content/public/common/associated_interface_provider.h"
#include "content/public/common/bindings_policy.h"
@@ -4461,9 +4462,10 @@ void RenderFrameImpl::WillSendRequest(blink::WebURLRequest& request) {
transition_type | ui::PAGE_TRANSITION_CLIENT_REDIRECT);
}
+ std::vector<std::unique_ptr<URLLoaderThrottle>> throttles;
GURL new_url;
if (GetContentClient()->renderer()->WillSendRequest(
- frame_, transition_type, request.Url(), &new_url)) {
+ frame_, transition_type, request.Url(), &throttles, &new_url)) {
request.SetURL(WebURL(new_url));
}
@@ -4560,6 +4562,9 @@ void RenderFrameImpl::WillSendRequest(blink::WebURLRequest& request) {
}
extra_data->set_url_loader_factory_override(url_loader_factory_.get());
+ // TODO(kinuko, yzshen): We need to set up throttles for some worker cases
+ // that don't go through here.
+ extra_data->set_url_loader_throttles(std::move(throttles));
request.SetExtraData(extra_data);
« no previous file with comments | « content/public/renderer/content_renderer_client.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698