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

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 10391158: Moves methods for finding browsers to browser_finder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include fixs Created 8 years, 7 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
Index: chrome/browser/app_controller_mac.mm
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 5d676e5252dd60f10426ec996aacda52280c130b..012c14b3798c7ea037d09e7bc5121a80cf1e4d37 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -37,6 +37,7 @@
#include "chrome/browser/sync/sync_ui_util.h"
#include "chrome/browser/sync/sync_ui_util_mac.h"
#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/startup/startup_browser_creator.h"
@@ -106,7 +107,7 @@ bool g_is_opening_new_window = false;
// not possible. If the last active browser is minimized (in particular, if
// there are only minimized windows), it will unminimize it.
Browser* ActivateBrowser(Profile* profile) {
- Browser* browser = BrowserList::GetLastActiveWithProfile(profile);
+ Browser* browser = browser::FindLastActiveWithProfile(profile);
if (browser)
browser->window()->Activate();
return browser;
@@ -372,8 +373,8 @@ const AEEventClass kAECloudPrintUninstallClass = 'GCPu';
}
- (void)didEndMainMessageLoop {
- DCHECK(!BrowserList::HasBrowserWithProfile([self lastProfile]));
- if (!BrowserList::HasBrowserWithProfile([self lastProfile])) {
+ DCHECK_EQ(0u, browser::GetBrowserCount([self lastProfile]));
+ if (!browser::GetBrowserCount([self lastProfile])) {
// As we're shutting down, we need to nuke the TabRestoreService, which
// will start the shutdown of the NavigationControllers and allow for
// proper shutdown. If we don't do this, Chrome won't shut down cleanly,
@@ -682,7 +683,7 @@ const AEEventClass kAECloudPrintUninstallClass = 'GCPu';
if ([self userWillWaitForInProgressDownloads:downloadCount]) {
// Create a new browser window (if necessary) and navigate to the
// downloads page if the user chooses to wait.
- Browser* browser = BrowserList::FindBrowserWithProfile(profiles[i]);
+ Browser* browser = browser::FindBrowserWithProfile(profiles[i]);
if (!browser) {
browser = Browser::Create(profiles[i]);
browser->window()->Show();

Powered by Google App Engine
This is Rietveld 408576698