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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator.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, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/startup/startup_browser_creator.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator.h"
6 6
7 #include <algorithm> // For max(). 7 #include <algorithm> // For max().
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 CommandLine::StringType path = command_line.GetSwitchValueNative( 581 CommandLine::StringType path = command_line.GetSwitchValueNative(
582 switches::kLoadAndLaunchApp); 582 switches::kLoadAndLaunchApp);
583 extensions::UnpackedInstaller::Create( 583 extensions::UnpackedInstaller::Create(
584 last_used_profile->GetExtensionService())-> 584 last_used_profile->GetExtensionService())->
585 LoadFromCommandLine(base::FilePath(path), true); 585 LoadFromCommandLine(base::FilePath(path), true);
586 // Return early here since we don't want to open a browser window. 586 // Return early here since we don't want to open a browser window.
587 // The exception is when there are no browser windows, since we don't want 587 // The exception is when there are no browser windows, since we don't want
588 // chrome to shut down. 588 // chrome to shut down.
589 // TODO(jackhou): Do this properly once keep-alive is handled by the 589 // TODO(jackhou): Do this properly once keep-alive is handled by the
590 // background page of apps. Tracked at http://crbug.com/175381 590 // background page of apps. Tracked at http://crbug.com/175381
591 if (chrome::GetBrowserCount(last_used_profile) != 0) 591 if (chrome::GetTotalBrowserCountForProfile(last_used_profile) != 0)
592 return true; 592 return true;
593 } 593 }
594 594
595 chrome::startup::IsProcessStartup is_process_startup = process_startup ? 595 chrome::startup::IsProcessStartup is_process_startup = process_startup ?
596 chrome::startup::IS_PROCESS_STARTUP : 596 chrome::startup::IS_PROCESS_STARTUP :
597 chrome::startup::IS_NOT_PROCESS_STARTUP; 597 chrome::startup::IS_NOT_PROCESS_STARTUP;
598 chrome::startup::IsFirstRun is_first_run = first_run::IsChromeFirstRun() ? 598 chrome::startup::IsFirstRun is_first_run = first_run::IsChromeFirstRun() ?
599 chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN; 599 chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN;
600 // |last_opened_profiles| will be empty in the following circumstances: 600 // |last_opened_profiles| will be empty in the following circumstances:
601 // - This is the first launch. |last_used_profile| is the initial profile. 601 // - This is the first launch. |last_used_profile| is the initial profile.
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 710
711 // static 711 // static
712 bool StartupBrowserCreator::ActivatedProfile() { 712 bool StartupBrowserCreator::ActivatedProfile() {
713 return profile_launch_observer.Get().activated_profile(); 713 return profile_launch_observer.Get().activated_profile();
714 } 714 }
715 715
716 bool HasPendingUncleanExit(Profile* profile) { 716 bool HasPendingUncleanExit(Profile* profile) {
717 return profile->GetLastSessionExitType() == Profile::EXIT_CRASHED && 717 return profile->GetLastSessionExitType() == Profile::EXIT_CRASHED &&
718 !profile_launch_observer.Get().HasBeenLaunched(profile); 718 !profile_launch_observer.Get().HasBeenLaunched(profile);
719 } 719 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_browsertest.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