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

Unified Diff: chrome/browser/metrics/first_web_contents_profiler.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/memory/tab_manager.cc ('k') | chrome/browser/profile_resetter/profile_resetter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/first_web_contents_profiler.cc
diff --git a/chrome/browser/metrics/first_web_contents_profiler.cc b/chrome/browser/metrics/first_web_contents_profiler.cc
index fcce4d957a57715782a36e4310bb9db7e98212a2..4985a715635ae2eb89e99485ac53f1cb56ed6554 100644
--- a/chrome/browser/metrics/first_web_contents_profiler.cc
+++ b/chrome/browser/metrics/first_web_contents_profiler.cc
@@ -14,7 +14,7 @@
#include "base/time/time.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 "components/metrics/profiler/tracking_synchronizer.h"
#include "components/metrics/proto/profiler_event.pb.h"
@@ -23,10 +23,9 @@
// static
void FirstWebContentsProfiler::Start() {
- for (chrome::BrowserIterator browser_it; !browser_it.done();
- browser_it.Next()) {
+ for (auto* browser : *BrowserList::GetInstance()) {
content::WebContents* web_contents =
- browser_it->tab_strip_model()->GetActiveWebContents();
+ browser->tab_strip_model()->GetActiveWebContents();
if (web_contents) {
// FirstWebContentsProfiler owns itself and is also bound to
// |web_contents|'s lifetime by observing WebContentsDestroyed().
« no previous file with comments | « chrome/browser/memory/tab_manager.cc ('k') | chrome/browser/profile_resetter/profile_resetter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698