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

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

Issue 1637943003: Remove HostDesktopType from BrowserList::GetInstance() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screen-wrapper-land
Patch Set: mac2 Created 4 years, 11 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_command_controller_browsertest.cc ('k') | chrome/browser/ui/browser_iterator.h » ('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 9dedf681b5dc61d308848ddcfdc434dad445fc2a..a785240e72ed299e8ec0d8102d6ca750a3f4bc0a 100644
--- a/chrome/browser/ui/browser_finder.cc
+++ b/chrome/browser/ui/browser_finder.cc
@@ -112,7 +112,7 @@ Browser* FindBrowserWithTabbedOrAnyType(Profile* profile,
chrome::HostDesktopType desktop_type,
bool match_tabbed,
bool match_original_profiles) {
- BrowserList* browser_list_impl = BrowserList::GetInstance(desktop_type);
+ BrowserList* browser_list_impl = BrowserList::GetInstance();
if (!browser_list_impl)
return NULL;
uint32_t match_types = kMatchAny;
@@ -136,7 +136,7 @@ Browser* FindBrowserWithTabbedOrAnyType(Profile* profile,
size_t GetBrowserCountImpl(Profile* profile,
chrome::HostDesktopType desktop_type,
uint32_t match_types) {
- BrowserList* browser_list_impl = BrowserList::GetInstance(desktop_type);
+ BrowserList* browser_list_impl = BrowserList::GetInstance();
size_t count = 0;
if (browser_list_impl) {
for (BrowserList::const_iterator i = browser_list_impl->begin();
@@ -204,7 +204,7 @@ Browser* FindBrowserWithWebContents(const WebContents* web_contents) {
}
Browser* FindLastActiveWithProfile(Profile* profile, HostDesktopType type) {
- BrowserList* list = BrowserList::GetInstance(type);
+ BrowserList* list = BrowserList::GetInstance();
// We are only interested in last active browsers, so we don't fall back to
// all browsers like FindBrowserWith* do.
return FindBrowserMatching(list->begin_last_active(), list->end_last_active(),
@@ -212,19 +212,14 @@ Browser* FindLastActiveWithProfile(Profile* profile, HostDesktopType type) {
}
Browser* FindLastActiveWithHostDesktopType(HostDesktopType type) {
- BrowserList* browser_list_impl = BrowserList::GetInstance(type);
+ BrowserList* browser_list_impl = BrowserList::GetInstance();
if (browser_list_impl)
return browser_list_impl->GetLastActive();
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 += BrowserList::GetInstance(t)->size();
- }
- return count;
+ return BrowserList::GetInstance()->size();
}
size_t GetTotalBrowserCountForProfile(Profile* profile) {
« no previous file with comments | « chrome/browser/ui/browser_command_controller_browsertest.cc ('k') | chrome/browser/ui/browser_iterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698