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

Unified Diff: chrome/browser/ui/tabs/pinned_tab_service.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/tabs/pinned_tab_service.cc
diff --git a/chrome/browser/ui/tabs/pinned_tab_service.cc b/chrome/browser/ui/tabs/pinned_tab_service.cc
index 0762dcd9ff0379efe7e5b368d399f8cb2b5e161e..5f56a5ecf9a5c511250eb07a09b41f2f46188a2a 100644
--- a/chrome/browser/ui/tabs/pinned_tab_service.cc
+++ b/chrome/browser/ui/tabs/pinned_tab_service.cc
@@ -7,7 +7,7 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/profiles/profile.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/pinned_tab_codec.h"
#include "content/public/browser/notification_service.h"
@@ -16,9 +16,9 @@ namespace {
// Returns true if |browser| is the only normal (tabbed) browser for |browser|'s
// profile (across all desktops).
bool IsOnlyNormalBrowser(Browser* browser) {
- for (chrome::BrowserIterator it; !it.done(); it.Next()) {
- if (*it != browser && it->is_type_tabbed() &&
- it->profile() == browser->profile()) {
+ for (auto* b : *BrowserList::GetInstance()) {
+ if (b != browser && b->is_type_tabbed() &&
+ b->profile() == browser->profile()) {
return false;
}
}
« no previous file with comments | « chrome/browser/ui/tabs/pinned_tab_codec.cc ('k') | chrome/browser/ui/tabs/tab_strip_model_stats_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698