Index: chrome/browser/profiles/profile_manager.cc |
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc |
index 070486a578cdf11ba175d370d1a20d130bbd1308..8fae692cf84c381dcc44e570dc9bfd56f3180c69 100644 |
--- a/chrome/browser/profiles/profile_manager.cc |
+++ b/chrome/browser/profiles/profile_manager.cc |
@@ -54,7 +54,7 @@ |
#include "chrome/browser/signin/signin_manager_factory.h" |
#include "chrome/browser/sync/profile_sync_service_factory.h" |
#include "chrome/browser/ui/browser.h" |
-#include "chrome/browser/ui/browser_iterator.h" |
+#include "chrome/browser/ui/browser_list.h" |
#include "chrome/browser/ui/sync/sync_promo_ui.h" |
#include "chrome/common/chrome_constants.h" |
#include "chrome/common/chrome_paths_internal.h" |
@@ -1485,8 +1485,8 @@ void ProfileManager::BrowserListObserver::OnBrowserRemoved( |
Profile* profile = browser->profile(); |
Profile* original_profile = profile->GetOriginalProfile(); |
// Do nothing if the closed window is not the last window of the same profile. |
- for (chrome::BrowserIterator it; !it.done(); it.Next()) { |
- if (it->profile()->GetOriginalProfile() == original_profile) |
+ for (auto* browser : *BrowserList::GetInstance()) { |
+ if (browser->profile()->GetOriginalProfile() == original_profile) |
return; |
} |