Commit fc2142d3 authored by David Black's avatar David Black Committed by Commit Bot

Only allow http/https scheme for proactive suggestions.

Previously non-http/https schemes were allowed.

Bug: b:143156047
Change-Id: I01074dc64dcb5f39e45f3198ad8897946d91090f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1873111
Commit-Queue: David Black <dmblack@google.com>
Reviewed-by: default avatarTao Wu <wutao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708381}
parent 8f16b49f
...@@ -174,7 +174,8 @@ void ProactiveSuggestionsClientImpl::SetActiveUrl(const GURL& url) { ...@@ -174,7 +174,8 @@ void ProactiveSuggestionsClientImpl::SetActiveUrl(const GURL& url) {
// The previous set of proactive suggestions is no longer valid. // The previous set of proactive suggestions is no longer valid.
SetActiveProactiveSuggestions(nullptr); SetActiveProactiveSuggestions(nullptr);
if (active_url_.is_empty()) { // We only load proactive suggestions for http/https schemes.
if (!url.is_valid() || !url.SchemeIsHTTPOrHTTPS()) {
loader_.reset(); loader_.reset();
return; return;
} }
......
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