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

Unified Diff: chrome/browser/push_messaging/push_messaging_notification_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
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | chrome/browser/search/search.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/push_messaging/push_messaging_notification_manager.cc
diff --git a/chrome/browser/push_messaging/push_messaging_notification_manager.cc b/chrome/browser/push_messaging/push_messaging_notification_manager.cc
index c0fd19fbc2b0533b55b1344997d346d52ff66dde..1131921346768d0f174d42bff75d17420c029a57 100644
--- a/chrome/browser/push_messaging/push_messaging_notification_manager.cc
+++ b/chrome/browser/push_messaging/push_messaging_notification_manager.cc
@@ -37,7 +37,7 @@
#include "chrome/browser/ui/android/tab_model/tab_model_list.h"
#else
#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"
#endif
@@ -153,10 +153,10 @@ void PushMessagingNotificationManager::DidGetNotificationsFromDatabase(
Profile* profile = (*it)->GetProfile();
WebContents* active_web_contents = (*it)->GetActiveWebContents();
#else
- for (chrome::BrowserIterator it; !it.done(); it.Next()) {
- Profile* profile = it->profile();
+ for (auto* browser : *BrowserList::GetInstance()) {
+ Profile* profile = browser->profile();
WebContents* active_web_contents =
- it->tab_strip_model()->GetActiveWebContents();
+ browser->tab_strip_model()->GetActiveWebContents();
#endif
if (IsTabVisible(profile, active_web_contents, origin)) {
notification_needed = false;
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | chrome/browser/search/search.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698