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

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

Issue 10079023: Move notifications used only in chrome/ out of content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: six! Created 8 years, 8 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.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(

Powered by Google App Engine
This is Rietveld 408576698