Index: chrome/browser/google/google_url_tracker_navigation_helper_impl.cc |
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 8a1cb14f5763a6960efd75d8ec0dff2bf8554d08..867a84fdc9c6e389162761bb1930b8cd7065e939 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); |
-} |