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

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

Issue 2573703003: chromeos: Fix shelf appearing at login screen under mash (Closed)
Patch Set: msw comments Created 4 years 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 | « ash/shell.cc ('k') | chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.cc » ('j') | 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 466133dfe07f97373a7f2367457293c2f7e40463..54514ca0119f754ec9d4d3a722208580e715bf99 100644
--- a/chrome/browser/chromeos/login/session/chrome_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/chrome_session_manager.cc
@@ -26,6 +26,7 @@
#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/session_controller_client.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chromeos/audio/cras_audio_handler.h"
@@ -133,8 +134,12 @@ void StartRestoreAfterCrashSession(Profile* user_profile,
bool is_running_test = command_line->HasSwitch(::switches::kTestName) ||
command_line->HasSwitch(::switches::kTestType);
-
- if (!is_running_test) {
+ if (is_running_test) {
+ // Some browser tests (e.g. BrowserTest.GetSizeForNewRenderView) require
+ // that ash is synchronously initialized before the first test window opens.
+ // Ensure the session-related mojo messages are sent to ash.
+ SessionControllerClient::FlushForTesting();
+ } else {
// Enable CrasAudioHandler logging when chrome restarts after crashing.
if (chromeos::CrasAudioHandler::IsInitialized())
chromeos::CrasAudioHandler::Get()->LogErrors();
« no previous file with comments | « ash/shell.cc ('k') | chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698