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

Unified Diff: chrome/browser/profiles/profile_manager.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/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;
}

Powered by Google App Engine
This is Rietveld 408576698