Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index 99af8b897e1fcc4f5aea12abefe75abedc113889..2e6f2db5ff9751f3854d094f79692342d84bb39b 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -96,6 +96,7 @@ |
#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_navigator.h" |
#include "chrome/browser/ui/browser_tab_contents.h" |
@@ -715,16 +716,15 @@ 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 (BrowserList::const_iterator iter = BrowserList::begin(); |
- iter != BrowserList::end(); ++iter) { |
+ for (chrome::BrowserIterator it; !it.done(); it.Next()) { |
// Don't count this browser window or any other in the process of closing. |
- Browser* const browser = *iter; |
+ 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 ((*iter)->profile() == profile()) |
+ if (it->profile() == profile()) |
profile_window_count++; |
total_window_count++; |
} |