| Index: chrome/browser/ui/search/search_tab_helper.cc
|
| diff --git a/chrome/browser/ui/search/search_tab_helper.cc b/chrome/browser/ui/search/search_tab_helper.cc
|
| index 3ff3225effe808b617a10aaabdf5f0f290800216..f807b049e863370bc342bd8d00dae714b248b503 100644
|
| --- a/chrome/browser/ui/search/search_tab_helper.cc
|
| +++ b/chrome/browser/ui/search/search_tab_helper.cc
|
| @@ -257,6 +257,14 @@ void SearchTabHelper::Submit(const base::string16& text,
|
| void SearchTabHelper::OnTabActivated() {
|
| ipc_router_.OnTabActivated();
|
|
|
| + if (search::IsInstantNTP(web_contents_)) {
|
| + // Force creation of NTPUserDataLogger, if we loaded an NTP. The
|
| + // NTPUserDataLogger tries to detect whether the NTP is being created at
|
| + // startup or from the user opening a new tab, and if we wait until later,
|
| + // it won't correctly detect this case.
|
| + NTPUserDataLogger::GetOrCreateFromWebContents(web_contents_);
|
| + }
|
| +
|
| OmniboxView* omnibox_view = GetOmniboxView();
|
| if (search::ShouldPrerenderInstantUrlOnOmniboxFocus() &&
|
| omnibox_has_focus_fn_(omnibox_view)) {
|
|
|