Commit 47dcb6dc authored by Wenzhao Zang's avatar Wenzhao Zang Committed by Commit Bot

cros: Set quiet mode for message center during demo sessions

Demo mode is mainly implemented in //chrome, but there're some
initialization needed in //ash. Currently they are placed in
|SessionController::SetIsDemoSession|, we should consider creating
a demo_mode_controller in //ash if the logic becomes complex later.

Bug: 882700
Test: Manual, with/without Mash feature
Change-Id: I945d003875b0cf3864f5796810d09c83e30b76ea
Reviewed-on: https://chromium-review.googlesource.com/1220179Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590499}
parent 56b6dbab
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "services/preferences/public/cpp/pref_service_factory.h" #include "services/preferences/public/cpp/pref_service_factory.h"
#include "services/preferences/public/mojom/preferences.mojom.h" #include "services/preferences/public/mojom/preferences.mojom.h"
#include "services/service_manager/public/cpp/connector.h" #include "services/service_manager/public/cpp/connector.h"
#include "ui/message_center/message_center.h"
using session_manager::SessionState; using session_manager::SessionState;
...@@ -497,6 +498,8 @@ void SessionController::SetIsDemoSession() { ...@@ -497,6 +498,8 @@ void SessionController::SetIsDemoSession() {
is_demo_session_ = true; is_demo_session_ = true;
Shell::Get()->metrics()->StartDemoSessionMetricsRecording(); Shell::Get()->metrics()->StartDemoSessionMetricsRecording();
// Notifications should be silenced during demo sessions.
message_center::MessageCenter::Get()->SetQuietMode(true);
} }
void SessionController::SetSessionState(SessionState state) { void SessionController::SetSessionState(SessionState state) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment