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

Unified Diff: ash/shutdown_controller.cc

Issue 2734733002: Revert "chromeos: Move files in //ash/common to //ash, part 3" (Closed)
Patch Set: Created 3 years, 9 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/shutdown_controller.h ('k') | ash/sticky_keys/sticky_keys_overlay_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shutdown_controller.cc
diff --git a/ash/shutdown_controller.cc b/ash/shutdown_controller.cc
deleted file mode 100644
index e44061b3cceba565f7b0f5978bddc7efc04acca4..0000000000000000000000000000000000000000
--- a/ash/shutdown_controller.cc
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2016 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/shutdown_controller.h"
-
-#include "ash/shell_delegate.h"
-#include "ash/wm_shell.h"
-#include "base/sys_info.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/dbus/power_manager_client.h"
-
-namespace ash {
-
-ShutdownController::ShutdownController() {}
-
-ShutdownController::~ShutdownController() {}
-
-void ShutdownController::ShutDownOrReboot() {
- // For developers on Linux desktop just exit the app.
- if (!base::SysInfo::IsRunningOnChromeOS()) {
- WmShell::Get()->delegate()->Exit();
- return;
- }
-
- // On real Chrome OS hardware the power manager handles shutdown.
- using chromeos::DBusThreadManager;
- if (reboot_on_shutdown_)
- DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart();
- else
- DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown();
-}
-
-void ShutdownController::SetRebootOnShutdown(bool reboot_on_shutdown) {
- reboot_on_shutdown_ = reboot_on_shutdown;
-}
-
-void ShutdownController::BindRequest(mojom::ShutdownControllerRequest request) {
- bindings_.AddBinding(this, std::move(request));
-}
-
-} // namespace ash
« no previous file with comments | « ash/shutdown_controller.h ('k') | ash/sticky_keys/sticky_keys_overlay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698