Commit 6da798c9 authored by Moe Ahmadi's avatar Moe Ahmadi Committed by Commit Bot

[NTP][Realbox] Use AutocompleteMatch's |transition| for navigation

Autocomplete system provides the correct transition type to use when the
user navigates to a match. This is ui::PAGE_TRANSITION_TYPED for URL
matches and ui::PAGE_TRANSITION_GENERATED for other types which do not
look like a URL.

This allows for URL navigations from the NTP realbox to be correctly
recorded in the history backend and for the most visited tiles to be
updated accordingly.

Bug: 1090004
Change-Id: I1af862bfe8b926ccc729dc340fe8384e5759101b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2224020Reviewed-by: default avatarTibor Goldschwendt <tiborg@chromium.org>
Commit-Queue: Moe Ahmadi <mahmadi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774191}
parent 8dd182e3
......@@ -912,7 +912,7 @@ void SearchTabHelper::OpenAutocompleteMatch(
web_contents_->OpenURL(
content::OpenURLParams(match.destination_url, content::Referrer(),
disposition, ui::PAGE_TRANSITION_LINK, false));
disposition, match.transition, false));
// May delete us.
}
......
......@@ -879,7 +879,7 @@ void NewTabPageHandler::OpenAutocompleteMatch(
web_contents_->OpenURL(
content::OpenURLParams(match.destination_url, content::Referrer(),
disposition, ui::PAGE_TRANSITION_LINK, false));
disposition, match.transition, false));
}
void NewTabPageHandler::DeleteAutocompleteMatch(uint8_t line) {
......
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