Index: chrome/browser/instant/instant_unload_handler.cc |
diff --git a/chrome/browser/instant/instant_unload_handler.cc b/chrome/browser/instant/instant_unload_handler.cc |
index d4232087d97e6aeaa92423272574e1ffc25ccdb0..801eb5e6cf5116a7b79a4d15ad0617b274ca1269 100644 |
--- a/chrome/browser/instant/instant_unload_handler.cc |
+++ b/chrome/browser/instant/instant_unload_handler.cc |
@@ -4,9 +4,6 @@ |
#include "chrome/browser/instant/instant_unload_handler.h" |
-#include <algorithm> |
- |
-#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/browser_navigator.h" |
#include "chrome/browser/ui/tab_contents/tab_contents.h" |
#include "content/public/browser/render_view_host.h" |
@@ -99,11 +96,7 @@ void InstantUnloadHandler::Activate(WebContentsDelegateImpl* delegate) { |
params.tabstrip_index = delegate->index(); |
// Remove (and delete) the delegate. |
- ScopedVector<WebContentsDelegateImpl>::iterator i = |
- std::find(delegates_.begin(), delegates_.end(), delegate); |
- DCHECK(i != delegates_.end()); |
- delegates_.erase(i); |
- delegate = NULL; |
+ Destroy(delegate); |
// Add the tab back in. |
chrome::Navigate(¶ms); |