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

Unified Diff: chrome/browser/ui/startup/startup_browser_creator.cc

Issue 1661713002: Remove the rest of HostDesktopType from c/b/ui/browser_finder.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-11
Patch Set: linux adl 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
Index: chrome/browser/ui/startup/startup_browser_creator.cc
diff --git a/chrome/browser/ui/startup/startup_browser_creator.cc b/chrome/browser/ui/startup/startup_browser_creator.cc
index ace525e4ac58c695e11c7b9a9990c59a07192d52..94064fc03f0e1415045a141700cef7cacaa88a36 100644
--- a/chrome/browser/ui/startup/startup_browser_creator.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator.cc
@@ -166,10 +166,7 @@ class ProfileLaunchObserver : public content::NotificationObserver {
void AddLaunched(Profile* profile) {
launched_profiles_.insert(profile);
- // Since the startup code only executes for browsers launched in
- // desktop mode, i.e., HOST_DESKTOP_TYPE_NATIVE. Ash should never get here.
- if (chrome::FindBrowserWithProfile(profile,
- chrome::HOST_DESKTOP_TYPE_NATIVE)) {
+ if (chrome::FindBrowserWithProfile(profile)) {
// A browser may get opened before we get initialized (e.g., in tests),
// so we never see the NOTIFICATION_BROWSER_WINDOW_READY for it.
opened_profiles_.insert(profile);
@@ -216,8 +213,7 @@ class ProfileLaunchObserver : public content::NotificationObserver {
void ActivateProfile() {
// We need to test again, in case the profile got deleted in the mean time.
if (profile_to_activate_) {
- Browser* browser = chrome::FindBrowserWithProfile(
- profile_to_activate_, chrome::HOST_DESKTOP_TYPE_NATIVE);
+ Browser* browser = chrome::FindBrowserWithProfile(profile_to_activate_);
// |profile| may never get launched, e.g., if it only had
// incognito Windows and one of them was used to exit Chrome.
// So it won't have a browser in that case.
@@ -286,8 +282,8 @@ bool ShowUserManagerOnStartupIfNeeded(
// after clicking on a downloaded file in Guest mode).
if ((!last_used_profile->IsGuestSession() &&
!last_used_profile->IsSystemProfile()) ||
- (chrome::GetTotalBrowserCountForProfile(
- last_used_profile->GetOffTheRecordProfile()) > 0)) {
+ (chrome::GetBrowserCount(last_used_profile->GetOffTheRecordProfile()) >
+ 0)) {
return false;
}
}
@@ -727,7 +723,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl(
// chrome to shut down.
// TODO(jackhou): Do this properly once keep-alive is handled by the
// background page of apps. Tracked at http://crbug.com/175381
- if (chrome::GetTotalBrowserCountForProfile(last_used_profile) != 0)
+ if (chrome::GetBrowserCount(last_used_profile) != 0)
return true;
}
@@ -748,7 +744,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl(
// chrome to shut down.
// TODO(jackhou): Do this properly once keep-alive is handled by the
// background page of apps. Tracked at http://crbug.com/175381
- if (chrome::GetTotalBrowserCountForProfile(last_used_profile) != 0)
+ if (chrome::GetBrowserCount(last_used_profile) != 0)
return true;
}
« no previous file with comments | « chrome/browser/ui/scoped_tabbed_browser_displayer.cc ('k') | chrome/browser/ui/startup/startup_browser_creator_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698