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

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

Issue 285193002: Create GoogleURLTrackerClient interface and //chrome implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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 b6aa6c3595807ab8e926db6653ad3e262d4d790d..64e4c5cb1adbfb69f00aaf928d729ddf6ba26597 100644
--- a/chrome/browser/google/google_url_tracker_navigation_helper_impl.cc
+++ b/chrome/browser/google/google_url_tracker_navigation_helper_impl.cc
@@ -26,22 +26,6 @@ void GoogleURLTrackerNavigationHelperImpl::SetGoogleURLTracker(
tracker_ = tracker;
}
-void GoogleURLTrackerNavigationHelperImpl::SetListeningForNavigationStart(
- bool listen) {
- if (listen) {
- registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_PENDING,
- content::NotificationService::AllBrowserContextsAndSources());
- } else {
- registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_PENDING,
- content::NotificationService::AllBrowserContextsAndSources());
- }
-}
-
-bool GoogleURLTrackerNavigationHelperImpl::IsListeningForNavigationStart() {
- return registrar_.IsRegistered(this, content::NOTIFICATION_NAV_ENTRY_PENDING,
- content::NotificationService::AllBrowserContextsAndSources());
-}
-
void GoogleURLTrackerNavigationHelperImpl::SetListeningForNavigationCommit(
const content::NavigationController* nav_controller,
bool listen) {
@@ -104,23 +88,6 @@ void GoogleURLTrackerNavigationHelperImpl::Observe(
const content::NotificationSource& source,
const content::NotificationDetails& details) {
switch (type) {
- case content::NOTIFICATION_NAV_ENTRY_PENDING: {
- content::NavigationController* controller =
- content::Source<content::NavigationController>(source).ptr();
- content::WebContents* web_contents = controller->GetWebContents();
- InfoBarService* infobar_service =
- InfoBarService::FromWebContents(web_contents);
- // Because we're listening to all sources, there may be no
- // InfoBarService for some notifications, e.g. navigations in
- // bubbles/balloons etc.
- if (infobar_service) {
- tracker_->OnNavigationPending(
- controller, infobar_service,
- controller->GetPendingEntry()->GetUniqueID());
- }
- break;
- }
-
case content::NOTIFICATION_NAV_ENTRY_COMMITTED: {
content::NavigationController* controller =
content::Source<content::NavigationController>(source).ptr();

Powered by Google App Engine
This is Rietveld 408576698