Index: chrome/browser/google/google_url_tracker.cc |
diff --git a/chrome/browser/google/google_url_tracker.cc b/chrome/browser/google/google_url_tracker.cc |
index cff1bd61d931e4b05ca544c56c1029759f835c61..ee240f21749a0ceabdcb3aa14cc6974ac8aa6a2f 100644 |
--- a/chrome/browser/google/google_url_tracker.cc |
+++ b/chrome/browser/google/google_url_tracker.cc |
@@ -327,12 +327,16 @@ void GoogleURLTracker::Observe(int type, |
} |
case content::NOTIFICATION_NAV_ENTRY_COMMITTED: |
- case content::NOTIFICATION_TAB_CLOSED: |
OnNavigationCommittedOrTabClosed( |
content::Source<NavigationController>(source).ptr()-> |
GetWebContents(), type); |
break; |
+ case content::NOTIFICATION_WEB_CONTENTS_DESTROYED: |
+ OnNavigationCommittedOrTabClosed( |
+ content::Source<content::WebContents>(source).ptr(), type); |
+ break; |
+ |
default: |
NOTREACHED() << "Unknown notification received:" << type; |
} |
@@ -363,8 +367,10 @@ void GoogleURLTracker::OnNavigationPending( |
// tab close command since that means the load will never commit. |
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, |
content::Source<NavigationController>(controller_)); |
- registrar_.Add(this, content::NOTIFICATION_TAB_CLOSED, |
- content::Source<NavigationController>(controller_)); |
+ registrar_.Add( |
+ this, |
+ content::NOTIFICATION_WEB_CONTENTS_DESTROYED, |
+ content::Source<content::WebContents>(controller_->GetWebContents())); |
} |
void GoogleURLTracker::OnNavigationCommittedOrTabClosed( |