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

Unified Diff: android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc

Issue 24228003: Upstream ShouldOverrideUrlLoading changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a forgotten merge reject Created 7 years, 2 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: 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 642d9431309955184b8b853625c4effdb9700fb2..a5d8514a4f80cc22890c2b7d51d2c62af2f5552d 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
@@ -223,23 +223,12 @@ void AwResourceDispatcherHostDelegate::RequestBeginning(
throttles->push_back(new IoThreadClientThrottle(
child_id, route_id, request));
- bool allow_intercepting =
- // We allow intercepting navigations within subframes, but only if the
- // scheme other than http or https. This is because the embedder
- // can't distinguish main frame and subframe callbacks (which could lead
- // to broken content if the embedder decides to not ignore the main frame
- // navigation, but ignores the subframe navigation).
- // The reason this is supported at all is that certain JavaScript-based
- // frameworks use iframe navigation as a form of communication with the
- // embedder.
- (resource_type == ResourceType::MAIN_FRAME ||
- (resource_type == ResourceType::SUB_FRAME &&
- !request->url().SchemeIs(content::kHttpScheme) &&
- !request->url().SchemeIs(content::kHttpsScheme)));
- if (allow_intercepting) {
+ // We allow intercepting only navigations within main frames. This
+ // is used to post onPageStarted. We handle shouldOverrideUrlLoading
+ // via a sync IPC.
+ if (resource_type == ResourceType::MAIN_FRAME)
throttles->push_back(InterceptNavigationDelegate::CreateThrottleFor(
request));
- }
}
void AwResourceDispatcherHostDelegate::DownloadStarting(

Powered by Google App Engine
This is Rietveld 408576698