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

Unified Diff: chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc

Issue 385533002: [Mac] Make --apps-keep-chrome-alive on by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change switch name Created 6 years, 5 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/cocoa/apps/quit_with_apps_controller_mac.cc
diff --git a/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc b/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc
index 1d9fa4fb59667a78dff2dd16216aaae1ff56b55b..5560387fefc109a8c40616e789d7333220bec697 100644
--- a/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc
+++ b/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc
@@ -104,10 +104,10 @@ std::string QuitWithAppsController::id() const {
bool QuitWithAppsController::ShouldQuit() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAppsKeepChromeAlive)) {
- g_browser_process->local_state()->ClearPref(
- prefs::kNotifyWhenAppsKeepChromeAlive);
+ // Quit immediately if this is a test.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType) &&
+ !CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAppsKeepChromeAliveInTests)) {
return true;
}
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698