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

Unified Diff: chrome/browser/after_startup_task_utils.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 | « no previous file | chrome/browser/app_controller_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/after_startup_task_utils.cc
diff --git a/chrome/browser/after_startup_task_utils.cc b/chrome/browser/after_startup_task_utils.cc
index d1e7fd5f790ca84627a768c92c1b65301442cd94..dac77d0aca0248b488bcba60c1102b0a2f061f6e 100644
--- a/chrome/browser/after_startup_task_utils.cc
+++ b/chrome/browser/after_startup_task_utils.cc
@@ -17,7 +17,7 @@
#include "base/tracked_objects.h"
#include "build/build_config.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 "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h"
@@ -162,8 +162,8 @@ void StartupObserver::Start() {
#if !defined(OS_ANDROID)
WebContents* contents = nullptr;
- for (chrome::BrowserIterator iter; !iter.done(); iter.Next()) {
- contents = (*iter)->tab_strip_model()->GetActiveWebContents();
+ for (auto* browser : *BrowserList::GetInstance()) {
+ contents = browser->tab_strip_model()->GetActiveWebContents();
if (contents && contents->GetMainFrame() &&
contents->GetMainFrame()->GetVisibilityState() ==
blink::WebPageVisibilityStateVisible) {
« no previous file with comments | « no previous file | chrome/browser/app_controller_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698