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

Unified Diff: chrome/browser/chromeos/power/shutdown_client_impl.cc

Issue 2497123002: chromeos: Move device shutdown handling out of chrome into ash (Closed)
Patch Set: rebase Created 4 years, 1 month 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: chrome/browser/chromeos/power/shutdown_client_impl.cc
diff --git a/chrome/browser/chromeos/power/shutdown_client_impl.cc b/chrome/browser/chromeos/power/shutdown_client_impl.cc
deleted file mode 100644
index 97995575f5641bed06eefa9a9c0f5d3863dd66ae..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/power/shutdown_client_impl.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2012 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 "chrome/browser/chromeos/power/shutdown_client_impl.h"
-
-#include "base/logging.h"
-#include "chrome/browser/chromeos/settings/cros_settings.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/dbus/power_manager_client.h"
-#include "chromeos/dbus/session_manager_client.h"
-#include "chromeos/settings/cros_settings_names.h"
-
-namespace chromeos {
-
-ShutdownClientImpl::ShutdownClientImpl() : weak_factory_(this) {}
-
-ShutdownClientImpl::~ShutdownClientImpl() {}
-
-void ShutdownClientImpl::RequestShutdown() {
- CrosSettings* cros_settings = CrosSettings::Get();
- CrosSettingsProvider::TrustedStatus status =
- cros_settings->PrepareTrustedValues(base::Bind(
- &ShutdownClientImpl::RequestShutdown, weak_factory_.GetWeakPtr()));
- if (status != CrosSettingsProvider::TRUSTED)
- return;
-
- // Get the updated policy.
- bool reboot_on_shutdown = false;
- cros_settings->GetBoolean(kRebootOnShutdown, &reboot_on_shutdown);
-
- if (reboot_on_shutdown)
- DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart();
- else
- DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown();
-}
-
-} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/power/shutdown_client_impl.h ('k') | chrome/browser/chromeos/settings/shutdown_policy_forwarder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698