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

Unified Diff: chrome/browser/profile_resetter/profile_resetter.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
« no previous file with comments | « chrome/browser/metrics/first_web_contents_profiler.cc ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profile_resetter/profile_resetter.cc
diff --git a/chrome/browser/profile_resetter/profile_resetter.cc b/chrome/browser/profile_resetter/profile_resetter.cc
index 56ae49b5f3189a86f416be0dde2093580d797f1a..258705d6d75630efc9e37b21f72d884d2fe0273d 100644
--- a/chrome/browser/profile_resetter/profile_resetter.cc
+++ b/chrome/browser/profile_resetter/profile_resetter.cc
@@ -23,7 +23,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_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/tabs/tab_strip_model.h"
#include "chrome/common/pref_names.h"
#include "chrome/installer/util/browser_distribution.h"
@@ -295,9 +295,9 @@ void ProfileResetter::ResetStartupPages() {
void ProfileResetter::ResetPinnedTabs() {
// Unpin all the tabs.
- for (chrome::BrowserIterator it; !it.done(); it.Next()) {
- if (it->is_type_tabbed() && it->profile() == profile_) {
- TabStripModel* tab_model = it->tab_strip_model();
+ for (auto* browser : *BrowserList::GetInstance()) {
+ if (browser->is_type_tabbed() && browser->profile() == profile_) {
+ TabStripModel* tab_model = browser->tab_strip_model();
// Here we assume that indexof(any mini tab) < indexof(any normal tab).
// If we unpin the tab, it can be moved to the right. Thus traversing in
// reverse direction is correct.
« no previous file with comments | « chrome/browser/metrics/first_web_contents_profiler.cc ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698