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

Unified Diff: chrome/browser/ui/browser_finder.cc

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 | « chrome/browser/ui/browser_finder.h ('k') | chrome/browser/ui/browser_navigator_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_finder.cc
diff --git a/chrome/browser/ui/browser_finder.cc b/chrome/browser/ui/browser_finder.cc
index 1174f847c1d3cc4874445e2aae4d80236556bffe..55e548036be27274270e4f61683e66cab6bf553d 100644
--- a/chrome/browser/ui/browser_finder.cc
+++ b/chrome/browser/ui/browser_finder.cc
@@ -197,6 +197,15 @@ Browser* FindLastActiveWithHostDesktopType(HostDesktopType type) {
return NULL;
}
+size_t GetTotalBrowserCount() {
+ size_t count = 0;
+ for (HostDesktopType t = HOST_DESKTOP_TYPE_FIRST; t < HOST_DESKTOP_TYPE_COUNT;
+ t = static_cast<HostDesktopType>(t + 1)) {
+ count += BrowserListImpl::GetInstance(t)->size();
+ }
+ return count;
+}
+
size_t GetBrowserCount(Profile* profile) {
return GetBrowserCountImpl(profile, kDefaultHostDesktopType, kMatchAny);
}
« no previous file with comments | « chrome/browser/ui/browser_finder.h ('k') | chrome/browser/ui/browser_navigator_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698