| 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 e9c6395d792d358fcd93017efa883c43e6c109a0..edb8c5750b9be27be34dc0dc7345e3cb101dfbc9 100644
|
| --- a/chrome/browser/ui/search/search_tab_helper.cc
|
| +++ b/chrome/browser/ui/search/search_tab_helper.cc
|
| @@ -38,6 +38,7 @@
|
| #include "components/strings/grit/components_strings.h"
|
| #include "content/public/browser/navigation_details.h"
|
| #include "content/public/browser/navigation_entry.h"
|
| +#include "content/public/browser/navigation_handle.h"
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/notification_source.h"
|
| #include "content/public/browser/render_frame_host.h"
|
| @@ -215,10 +216,12 @@ void SearchTabHelper::OnTabDeactivated() {
|
| ipc_router_.OnTabDeactivated();
|
| }
|
|
|
| -void SearchTabHelper::DidStartNavigationToPendingEntry(
|
| - const GURL& url,
|
| - content::ReloadType /* reload_type */) {
|
| - if (search::IsNTPURL(url, profile())) {
|
| +void SearchTabHelper::DidStartNavigation(
|
| + content::NavigationHandle* navigation_handle) {
|
| + if (!navigation_handle->IsInMainFrame() || navigation_handle->IsSamePage())
|
| + return;
|
| +
|
| + if (search::IsNTPURL(navigation_handle->GetURL(), profile())) {
|
| // Set the title on any pending entry corresponding to the NTP. This
|
| // prevents any flickering of the tab title.
|
| content::NavigationEntry* entry =
|
| @@ -230,9 +233,11 @@ void SearchTabHelper::DidStartNavigationToPendingEntry(
|
| }
|
| }
|
|
|
| -void SearchTabHelper::DidNavigateMainFrame(
|
| - const content::LoadCommittedDetails& details,
|
| - const content::FrameNavigateParams& params) {
|
| +void SearchTabHelper::DidFinishNavigation(
|
| + content::NavigationHandle* navigation_handle) {
|
| + if (!navigation_handle->IsInMainFrame() || navigation_handle->IsSamePage())
|
| + return;
|
| +
|
| if (IsCacheableNTP(web_contents_)) {
|
| UMA_HISTOGRAM_ENUMERATION("InstantExtended.CacheableNTPLoad",
|
| search::CACHEABLE_NTP_LOAD_SUCCEEDED,
|
|
|