Commit 8f85effe authored by sky@chromium.org's avatar sky@chromium.org

Make ~WebNavigationEventRouter remove itself from browsers

I don't think this is related to the crash I'm seeing, but I noticed
it when looking for dangling TabStripModelObservers.

BUG=286162
TEST=none
R=yoz@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23547006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221959 0039d316-1c4b-4281-b951-d872f2087c98
parent 10c85f5d
......@@ -91,12 +91,13 @@ WebNavigationEventRouter::WebNavigationEventRouter(Profile* profile)
content::NotificationService::AllSources());
BrowserList::AddObserver(this);
for (chrome::BrowserIterator it; !it.done(); it.Next()) {
for (chrome::BrowserIterator it; !it.done(); it.Next())
OnBrowserAdded(*it);
}
}
WebNavigationEventRouter::~WebNavigationEventRouter() {
for (chrome::BrowserIterator it; !it.done(); it.Next())
OnBrowserRemoved(*it);
BrowserList::RemoveObserver(this);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment