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

Unified Diff: content/test/test_web_contents.cc

Issue 14651029: content: Remove usage of NOTIFICATION_WEB_CONTENTS_DESTROYED from content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo, rebase Created 7 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
« no previous file with comments | « content/shell/shell.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_web_contents.cc
diff --git a/content/test/test_web_contents.cc b/content/test/test_web_contents.cc
index a51be653e4d8bf7812c73e1c64564139c2c8c290..e46182b1129cba441e9db23673f9be5bd8293a01 100644
--- a/content/test/test_web_contents.cc
+++ b/content/test/test_web_contents.cc
@@ -170,15 +170,13 @@ void TestWebContents::SetOpener(TestWebContents* opener) {
// This is normally only set in the WebContents constructor, which also
// registers an observer for when the opener gets closed.
opener_ = opener;
- registrar_.Add(this, NOTIFICATION_WEB_CONTENTS_DESTROYED,
- Source<WebContents>(opener_));
+ AddDestructionObserver(opener_);
}
void TestWebContents::AddPendingContents(TestWebContents* contents) {
// This is normally only done in WebContentsImpl::CreateNewWindow.
pending_contents_[contents->GetRenderViewHost()->GetRoutingID()] = contents;
- registrar_.Add(this, NOTIFICATION_WEB_CONTENTS_DESTROYED,
- Source<WebContents>(contents));
+ AddDestructionObserver(contents);
}
void TestWebContents::ExpectSetHistoryLengthAndPrune(
« no previous file with comments | « content/shell/shell.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698