Index: chrome/browser/ui/omnibox/omnibox_edit_model.cc |
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
index 9794fae72cd2c540812bea37d1fb9089ca0a755a..507154fec4660ca4b67b2e0680b37bfcb12b5a11 100644 |
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
@@ -707,6 +707,18 @@ void OmniboxEditModel::OpenMatch(const AutocompleteMatch& match, |
base::TimeTicks::Now() - time_user_first_modified_omnibox_; |
const GURL destination_url = autocomplete_controller_-> |
GetDestinationURL(match, query_formulation_time); |
+ |
+ // If running with instant, notify the instant controller that a navigation |
+ // is about to take place if we are navigating to a URL. This can be |
+ // determined by inspecting the transition type. Note that only the user- |
+ // entered content, not the full match should be sent down to avoid leaking |
+ // autocompleted content. |
+ if (match.transition == content::PAGE_TRANSITION_TYPED) { |
sreeram
2013/03/26 20:05:42
Surprisingly, this works. :)
I thought perhaps it
robertshield
2013/03/27 21:44:05
Afaict, this is true. I cannot find any code path
Peter Kasting
2013/03/27 21:51:47
TYPED always indicates a URL, but not all URLs are
|
+ InstantController* instant = controller_->GetInstant(); |
+ if (instant) |
+ instant->OnNavigateToURL(autocomplete_controller_->input().text()); |
sreeram
2013/03/26 20:05:42
Why do we need to send any text down to the page a
robertshield
2013/03/27 21:44:05
Ok, removed the text and now send down the empty s
|
+ } |
+ |
// This calls RevertAll again. |
base::AutoReset<bool> tmp(&in_revert_, true); |
controller_->OnAutocompleteAccept(destination_url, disposition, |