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

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 12212120: Replace most BrowserList::empty() and BrowserList::size() calls by multi-desktop aware calls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge up to r182110 Created 7 years, 10 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/browser_commands_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/app_controller_mac.mm
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 037c125d4302ae0c3bcc629a3ae723950268b266..a6425a0cad4db3484b12118b9000e647c4b037c4 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -42,7 +42,6 @@
#include "chrome/browser/ui/browser_commands.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"
@@ -303,7 +302,7 @@ void RecordLastRunAppBundlePath() {
[self applicationShouldTerminate:app] != NSTerminateNow)
return NO;
- size_t num_browsers = BrowserList::size();
+ size_t num_browsers = chrome::GetTotalBrowserCount();
// Initiate a shutdown (via browser::CloseAllBrowsers()) if we aren't
// already shutting down.
@@ -352,7 +351,7 @@ void RecordLastRunAppBundlePath() {
// Called when the app is shutting down. Clean-up as appropriate.
- (void)applicationWillTerminate:(NSNotification*)aNotification {
// There better be no browser windows left at this point.
- CHECK_EQ(0u, BrowserList::size());
+ CHECK_EQ(0u, chrome::GetTotalBrowserCount());
// Tell BrowserList not to keep the browser process alive. Once all the
// browsers get dealloc'd, it will stop the RunLoop and fall back into main().
@@ -486,7 +485,7 @@ void RecordLastRunAppBundlePath() {
// If the profile is incognito, use the original profile.
Profile* newProfile = [windowController profile]->GetOriginalProfile();
[self windowChangedToProfile:newProfile];
- } else if (BrowserList::empty()) {
+ } else if (chrome::GetTotalBrowserCount() == 0) {
[self windowChangedToProfile:
g_browser_process->profile_manager()->GetLastUsedProfile()];
}
« no previous file with comments | « no previous file | chrome/browser/browser_commands_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698