Index: android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc |
diff --git a/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc b/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc |
index 7f4cf3181a526c672ad00e48ab8e5c40058595a5..460eb3664806a64633ad1719606a2062eb2d7fbc 100644 |
--- a/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc |
+++ b/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc |
@@ -7,6 +7,7 @@ |
#include <memory> |
#include <string> |
+#include "android_webview/browser/aw_browser_context.h" |
#include "android_webview/browser/aw_contents_io_thread_client.h" |
#include "android_webview/browser/aw_login_delegate.h" |
#include "android_webview/browser/aw_resource_context.h" |
@@ -14,6 +15,7 @@ |
#include "base/memory/scoped_vector.h" |
#include "components/auto_login_parser/auto_login_parser.h" |
#include "components/navigation_interception/intercept_navigation_delegate.h" |
+#include "components/web_restrictions/browser/web_restrictions_resource_throttle.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/resource_controller.h" |
#include "content/public/browser/resource_dispatcher_host.h" |
@@ -228,8 +230,12 @@ void AwResourceDispatcherHostDelegate::RequestBeginning( |
throttles->push_back(new IoThreadClientThrottle( |
request_info->GetChildID(), request_info->GetRenderFrameID(), request)); |
- if (resource_type != content::RESOURCE_TYPE_MAIN_FRAME) |
+ bool is_main_frame = resource_type == content::RESOURCE_TYPE_MAIN_FRAME; |
+ if (!is_main_frame) |
InterceptNavigationDelegate::UpdateUserGestureCarryoverInfo(request); |
+ throttles->push_back(new web_restrictions::WebRestrictionsResourceThrottle( |
+ AwBrowserContext::GetDefault()->GetWebRestrictionProvider(), |
+ request->url(), is_main_frame)); |
} |
void AwResourceDispatcherHostDelegate::OnRequestRedirected( |