Commit 3b976a68 authored by jyquinn's avatar jyquinn Committed by Commit bot

Don't load WebUI if provisional navigation is for non-chrome URL

Putative fix for crbug.com/545479. If WebUIManager is created but
navigation occurs before the WebUI URL starts loading, provisional
navigation for a non-WebUI URL could be observed by WebUIManager, and
WebUI should not be loaded in that case.

BUG=545479

Review URL: https://codereview.chromium.org/1464383002

Cr-Commit-Position: refs/heads/master@{#361143}
parent 7c2d5428
......@@ -88,6 +88,10 @@ const char kScriptCommandPrefix[] = "webui";
- (void)webState:(web::WebState*)webState
didStartProvisionalNavigationForURL:(const GURL&)URL {
DCHECK(webState == _webState);
// If URL is not an application specific URL, ignore the navigation.
if (!web::GetWebClient()->IsAppSpecificURL(URL))
return;
GURL navigationURL(URL);
// Add request group ID to the URL, if not present. Request group ID may
// already be added if restoring state to a WebUI page.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment