| Index: chrome/browser/ui/browser_finder.cc
|
| diff --git a/chrome/browser/ui/browser_finder.cc b/chrome/browser/ui/browser_finder.cc
|
| index 0ee386c33ca23fa8e4b4c8142bb8ec242a8fb3fa..a7c22611145e4db50ca8499c58113ce2d6ad6190 100644
|
| --- a/chrome/browser/ui/browser_finder.cc
|
| +++ b/chrome/browser/ui/browser_finder.cc
|
| @@ -16,14 +16,6 @@ using content::WebContents;
|
|
|
| namespace {
|
|
|
| -// TODO(mad) eventually move this to host_desktop_type.h.
|
| -#if defined(OS_CHROMEOS)
|
| -chrome::HostDesktopType kDefaultHostDesktopType = chrome::HOST_DESKTOP_TYPE_ASH;
|
| -#else
|
| -chrome::HostDesktopType kDefaultHostDesktopType =
|
| - chrome::HOST_DESKTOP_TYPE_NATIVE;
|
| -#endif
|
| -
|
|
|
| // Type used to indicate to match anything.
|
| const int kMatchAny = 0;
|
| @@ -204,12 +196,21 @@ size_t GetTotalBrowserCount() {
|
| return count;
|
| }
|
|
|
| -size_t GetBrowserCount(Profile* profile) {
|
| - return GetBrowserCountImpl(profile, kDefaultHostDesktopType, kMatchAny);
|
| +size_t GetTotalBrowserCountForProfile(Profile* profile) {
|
| + size_t count = 0;
|
| + for (HostDesktopType t = HOST_DESKTOP_TYPE_FIRST; t < HOST_DESKTOP_TYPE_COUNT;
|
| + t = static_cast<HostDesktopType>(t + 1)) {
|
| + count += GetBrowserCount(profile, t);
|
| + }
|
| + return count;
|
| +}
|
| +
|
| +size_t GetBrowserCount(Profile* profile, HostDesktopType type) {
|
| + return GetBrowserCountImpl(profile, type, kMatchAny);
|
| }
|
|
|
| -size_t GetTabbedBrowserCount(Profile* profile) {
|
| - return GetBrowserCountImpl(profile, kDefaultHostDesktopType, kMatchTabbed);
|
| +size_t GetTabbedBrowserCount(Profile* profile, HostDesktopType type) {
|
| + return GetBrowserCountImpl(profile, type, kMatchTabbed);
|
| }
|
|
|
| } // namespace chrome
|
|
|