Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(625)

Unified Diff: chrome/browser/google/google_url_tracker_navigation_helper_impl.cc

Issue 18223002: InstantExtended: Remove overlay control code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Call renamed method. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
-}
« no previous file with comments | « chrome/browser/google/google_url_tracker_navigation_helper_impl.h ('k') | chrome/browser/history/history_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698