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

Unified Diff: ash/system/chromeos/session/last_window_closed_logout_reminder.cc

Issue 2108793002: mash: Convert system tray logout button to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more review comments, fix mash_unittests Created 4 years, 6 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: ash/system/chromeos/session/last_window_closed_logout_reminder.cc
diff --git a/ash/system/chromeos/session/last_window_closed_logout_reminder.cc b/ash/system/chromeos/session/last_window_closed_logout_reminder.cc
deleted file mode 100644
index f2cd5e64be3819c296b73e5a75e14ad28150c3e6..0000000000000000000000000000000000000000
--- a/ash/system/chromeos/session/last_window_closed_logout_reminder.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/system/chromeos/session/last_window_closed_logout_reminder.h"
-
-#include "ash/common/login_status.h"
-#include "ash/common/system/tray/system_tray_delegate.h"
-#include "ash/common/system/tray/system_tray_notifier.h"
-#include "ash/common/wm_shell.h"
-#include "ash/shell.h"
-#include "ash/system/chromeos/session/logout_confirmation_controller.h"
-#include "base/time/time.h"
-
-namespace ash {
-namespace {
-const int kLogoutConfirmationDelayInSeconds = 20;
-}
-
-LastWindowClosedLogoutReminder::LastWindowClosedLogoutReminder() {
- WmShell::Get()->system_tray_notifier()->AddLastWindowClosedObserver(this);
-}
-
-LastWindowClosedLogoutReminder::~LastWindowClosedLogoutReminder() {
- WmShell::Get()->system_tray_notifier()->RemoveLastWindowClosedObserver(this);
-}
-
-void LastWindowClosedLogoutReminder::OnLastWindowClosed() {
- if (WmShell::Get()->system_tray_delegate()->GetUserLoginStatus() !=
- LoginStatus::PUBLIC) {
- return;
- }
-
- // Ask the user to confirm logout if a public session is in progress and the
- // screen is not locked.
- Shell::GetInstance()->logout_confirmation_controller()->ConfirmLogout(
- base::TimeTicks::Now() +
- base::TimeDelta::FromSeconds(kLogoutConfirmationDelayInSeconds));
-}
-
-} // namespace ash
« no previous file with comments | « ash/system/chromeos/session/last_window_closed_logout_reminder.h ('k') | ash/system/chromeos/session/logout_button_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698