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

Unified Diff: chrome/browser/chromeos/login/session/chrome_session_manager.cc

Issue 2457143002: mash: Keep Chrome alive with ChromeSessionManager (Closed)
Patch Set: fix typo Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/session/chrome_session_manager.cc
diff --git a/chrome/browser/chromeos/login/session/chrome_session_manager.cc b/chrome/browser/chromeos/login/session/chrome_session_manager.cc
index de370b06785ac42669255e99a789109519bad318..eca7409e7edb7025ab824765360ef29e28dba694 100644
--- a/chrome/browser/chromeos/login/session/chrome_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/chrome_session_manager.cc
@@ -21,6 +21,7 @@
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/signin_manager_factory.h"
+#include "chrome/browser/ui/ash/ash_util.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
@@ -171,6 +172,14 @@ void ChromeSessionManager::Initialize(
const base::CommandLine& parsed_command_line,
Profile* profile,
bool is_running_test) {
+ // Keep Chrome alive for mash.
+ // TODO(xiyuan): Remove this when session manager is moved out of Chrome.
+ if (chrome::IsRunningInMash() &&
+ !base::CommandLine::ForCurrentProcess()->HasSwitch(
+ ::switches::kDisableZeroBrowsersOpenForTests)) {
+ g_browser_process->platform_part()->RegisterKeepAlive();
+ }
+
// Tests should be able to tune login manager before showing it. Thus only
// show login UI (login and out-of-box) in normal (non-testing) mode with
// --login-manager switch and if test passed --force-login-manager-in-tests.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698