| Index: chrome/browser/ui/browser_finder.cc
|
| diff --git a/chrome/browser/ui/browser_finder.cc b/chrome/browser/ui/browser_finder.cc
|
| index a785240e72ed299e8ec0d8102d6ca750a3f4bc0a..e79cae3a6f0624a1c2837170456e20d979542d2c 100644
|
| --- a/chrome/browser/ui/browser_finder.cc
|
| +++ b/chrome/browser/ui/browser_finder.cc
|
| @@ -8,7 +8,6 @@
|
|
|
| #include "build/build_config.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| -#include "chrome/browser/ui/browser_iterator.h"
|
| #include "chrome/browser/ui/browser_list.h"
|
| #include "chrome/browser/ui/browser_window.h"
|
| #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h"
|
| @@ -176,9 +175,9 @@ Browser* FindBrowserWithProfile(Profile* profile,
|
| }
|
|
|
| Browser* FindBrowserWithID(SessionID::id_type desired_id) {
|
| - for (BrowserIterator it; !it.done(); it.Next()) {
|
| - if (it->session_id().id() == desired_id)
|
| - return *it;
|
| + for (auto* browser : *BrowserList::GetInstance()) {
|
| + if (browser->session_id().id() == desired_id)
|
| + return browser;
|
| }
|
| return NULL;
|
| }
|
| @@ -186,8 +185,7 @@ Browser* FindBrowserWithID(SessionID::id_type desired_id) {
|
| Browser* FindBrowserWithWindow(gfx::NativeWindow window) {
|
| if (!window)
|
| return NULL;
|
| - for (BrowserIterator it; !it.done(); it.Next()) {
|
| - Browser* browser = *it;
|
| + for (auto* browser : *BrowserList::GetInstance()) {
|
| if (browser->window() && browser->window()->GetNativeWindow() == window)
|
| return browser;
|
| }
|
|
|