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

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

Issue 12315094: Remove kDefaultHostDesktopType from browser_finder.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix StartupBrowserCreatorTest.ProfilesWithoutPagesNotLaunched 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/panels/panel_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 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
« no previous file with comments | « chrome/browser/ui/browser_finder.h ('k') | chrome/browser/ui/panels/panel_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698