diff options
Diffstat (limited to 'chrome/browser/google/google_url_tracker_navigation_helper_impl.cc')
-rw-r--r-- | chrome/browser/google/google_url_tracker_navigation_helper_impl.cc | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/chrome/browser/google/google_url_tracker_navigation_helper_impl.cc b/chrome/browser/google/google_url_tracker_navigation_helper_impl.cc index 8a1cb14..867a84f 100644 --- a/chrome/browser/google/google_url_tracker_navigation_helper_impl.cc +++ b/chrome/browser/google/google_url_tracker_navigation_helper_impl.cc @@ -31,13 +31,9 @@ void GoogleURLTrackerNavigationHelperImpl::SetListeningForNavigationStart( if (listen) { registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_PENDING, content::NotificationService::AllBrowserContextsAndSources()); - registrar_.Add(this, chrome::NOTIFICATION_INSTANT_COMMITTED, - content::NotificationService::AllBrowserContextsAndSources()); } else { registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_PENDING, content::NotificationService::AllBrowserContextsAndSources()); - registrar_.Remove(this, chrome::NOTIFICATION_INSTANT_COMMITTED, - content::NotificationService::AllBrowserContextsAndSources()); } } @@ -148,33 +144,7 @@ void GoogleURLTrackerNavigationHelperImpl::Observe( break; } - case chrome::NOTIFICATION_INSTANT_COMMITTED: { - content::WebContents* web_contents = - content::Source<content::WebContents>(source).ptr(); - content::NavigationController* nav_controller = - &web_contents->GetController(); - const GURL& search_url = web_contents->GetURL(); - if (!search_url.is_valid()) // Not clear if this can happen. - tracker_->OnTabClosed(nav_controller); - OnInstantCommitted(nav_controller, - InfoBarService::FromWebContents(web_contents), - search_url); - break; - } - default: NOTREACHED() << "Unknown notification received:" << type; } } - -void GoogleURLTrackerNavigationHelperImpl::OnInstantCommitted( - content::NavigationController* nav_controller, - InfoBarService* infobar_service, - const GURL& search_url) { - // Call OnNavigationPending, giving |tracker_| the option to register for - // navigation commit messages for this navigation controller. If it does - // register for them, simulate the commit as well. - tracker_->OnNavigationPending(nav_controller, infobar_service, 0); - if (IsListeningForNavigationCommit(nav_controller)) - tracker_->OnNavigationCommitted(infobar_service, search_url); -} |