Chromium Code Reviews| Index: chrome/browser/app_controller_mac.mm |
| diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm |
| index 26784c9d25f8dc800ae2f79de302ffb0f20939d3..0b54b4866519f5463fb7945bff6ed3c89067120e 100644 |
| --- a/chrome/browser/app_controller_mac.mm |
| +++ b/chrome/browser/app_controller_mac.mm |
| @@ -53,7 +53,7 @@ |
| #include "chrome/browser/ui/browser_commands.h" |
| #include "chrome/browser/ui/browser_dialogs.h" |
| #include "chrome/browser/ui/browser_finder.h" |
| -#include "chrome/browser/ui/browser_iterator.h" |
| +#include "chrome/browser/ui/browser_list.h" |
| #include "chrome/browser/ui/browser_mac.h" |
| #include "chrome/browser/ui/browser_window.h" |
| #include "chrome/browser/ui/chrome_pages.h" |
| @@ -490,7 +490,7 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver { |
| - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)app { |
| // If there are no windows, quit immediately. |
| - if (chrome::BrowserIterator().done() && |
| + if (BrowserList::GetInstance()->empty() && |
| !AppWindowRegistryUtil::IsAppWindowVisibleInAnyProfile(0)) { |
| return NSTerminateNow; |
| } |
| @@ -635,8 +635,7 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver { |
| // completed, raise browser windows. |
| reopenTime_ = base::TimeTicks(); |
| std::set<NSWindow*> browserWindows; |
| - for (chrome::BrowserIterator iter; !iter.done(); iter.Next()) { |
| - Browser* browser = *iter; |
| + for (auto* browser : *BrowserList::GetInstance()) { |
|
sky
2016/01/28 16:58:12
nit: no {}
scottmg
2016/01/28 17:36:28
Done.
|
| browserWindows.insert(browser->window()->GetNativeWindow()); |
| } |
| if (!browserWindows.empty()) { |
| @@ -1191,8 +1190,7 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver { |
| // notifications so we still need to open a new window. |
| if (hasVisibleWindows) { |
| std::set<NSWindow*> browserWindows; |
| - for (chrome::BrowserIterator iter; !iter.done(); iter.Next()) { |
| - Browser* browser = *iter; |
| + for (auto* browser : *BrowserList::GetInstance()) { |
| // When focusing Chrome, don't focus any browser windows associated with |
| // a currently running app shim, so ignore them. |
| if (browser && browser->is_app()) { |