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

Unified Diff: chrome/browser/ui/browser.cc

Issue 1644773003: Remove BrowserIterator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@host-desktop-1
Patch Set: . Created 4 years, 11 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/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 2de528d9f2231553fb6a9e426bd09c496e2e91c1..547c619d165abdf7fd9c46158752c45d9e26e243 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -98,7 +98,6 @@
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_instant_controller.h"
-#include "chrome/browser/ui/browser_iterator.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_live_tab_context.h"
#include "chrome/browser/ui/browser_navigator.h"
@@ -799,15 +798,14 @@ Browser::DownloadClosePreventionType Browser::OkToCloseWithInProgressDownloads(
// profile, that are relevant for the ok-to-close decision.
int profile_window_count = 0;
int total_window_count = 0;
- for (chrome::BrowserIterator it; !it.done(); it.Next()) {
+ for (auto* browser : *BrowserList::GetInstance()) {
// Don't count this browser window or any other in the process of closing.
- Browser* const browser = *it;
// Window closing may be delayed, and windows that are in the process of
// closing don't count against our totals.
if (browser == this || browser->IsAttemptingToCloseBrowser())
continue;
- if (it->profile() == profile())
+ if (browser->profile() == profile())
profile_window_count++;
total_window_count++;
}
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698