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

Unified Diff: ash/shell.cc

Issue 2797743002: ash: Merge LoginStatus update code path (Closed)
Patch Set: for #2 comments Created 3 years, 8 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 | « ash/shell.h ('k') | ash/shell/content/client/shell_browser_main_parts.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index a0596e19a4fbfa7d47565d71157522ae5b830056..ada3da93fd5a4fa6d12b4de78f5e6bc9104c122d 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -328,11 +328,6 @@ void Shell::SetDisplayWorkAreaInsets(Window* contains,
wm_shell_->SetDisplayWorkAreaInsets(WmWindow::Get(contains), insets);
}
-void Shell::OnLoginStateChanged(LoginStatus status) {
- for (auto& observer : shell_observers_)
- observer.OnLoginStateChanged(status);
-}
-
void Shell::OnAppTerminating() {
for (auto& observer : shell_observers_)
observer.OnAppTerminating();
@@ -1241,13 +1236,14 @@ void Shell::SessionStateChanged(session_manager::SessionState state) {
CreateKeyboard();
}
}
+}
- // Only trigger an update in mash because with classic ash chrome calls
- // UpdateAfterLoginStatusChange() directly.
- if (wm_shell_->IsRunningInMash()) {
- // TODO(jamescook): Should this call Shell::OnLoginStatusChanged() too?
- UpdateAfterLoginStatusChange(session_controller_->GetLoginStatus());
- }
+void Shell::LoginStatusChanged(LoginStatus login_status) {
+ UpdateAfterLoginStatusChange(login_status);
+
+ // TODO(xiyuan): Update OnLoginStateChanged -> OnLoginStatusChanged.
+ for (auto& observer : shell_observers_)
+ observer.OnLoginStateChanged(login_status);
}
void Shell::OnPrefServiceInitialized(
« no previous file with comments | « ash/shell.h ('k') | ash/shell/content/client/shell_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698