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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 2606293002: Remove ScopedVector from chrome/browser/ui. (Closed)
Patch Set: view Created 3 years, 12 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/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index e34983dae09a4faf5753142b2ef8d19836919241..5c599dd5c8e521453c3c56f7a7b93c7fae24f8b3 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1734,9 +1734,13 @@ void BrowserView::OnWidgetDestroying(views::Widget* widget) {
// Destroy any remaining WebContents early on. Doing so may result in
// calling back to one of the Views/LayoutManagers or supporting classes of
// BrowserView. By destroying here we ensure all said classes are valid.
- ScopedVector<content::WebContents> contents;
+ std::vector<content::WebContents*> contents;
while (browser()->tab_strip_model()->count())
contents.push_back(browser()->tab_strip_model()->DetachWebContentsAt(0));
+ // Note: The BrowserViewTest tests rely on the contents being destroyed in the
+ // order that they were present in the tab strip.
+ for (auto* content : contents)
+ delete content;
}
void BrowserView::OnWidgetActivationChanged(views::Widget* widget,

Powered by Google App Engine
This is Rietveld 408576698