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

Unified Diff: chrome/browser/chromeos/policy/remote_commands/device_command_reboot_job.cc

Issue 1102023002: Call callback asynchronously for device reboot command (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remote-0420
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/policy/remote_commands/device_command_reboot_job.cc
diff --git a/chrome/browser/chromeos/policy/remote_commands/device_command_reboot_job.cc b/chrome/browser/chromeos/policy/remote_commands/device_command_reboot_job.cc
index f21b96fbbcbb2c71f52cf755d2898b100399d9f8..2815759fd49055ad2b692a490880641e60465bca 100644
--- a/chrome/browser/chromeos/policy/remote_commands/device_command_reboot_job.cc
+++ b/chrome/browser/chromeos/policy/remote_commands/device_command_reboot_job.cc
@@ -9,7 +9,9 @@
#include "base/bind.h"
#include "base/location.h"
#include "base/logging.h"
+#include "base/single_thread_task_runner.h"
#include "base/sys_info.h"
+#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "chromeos/dbus/power_manager_client.h"
#include "policy/proto/device_management_backend.pb.h"
@@ -62,7 +64,8 @@ void DeviceCommandRebootJob::RunImpl(
// performed and we invoke it. |kMinimumUptimeInMinutes| defines a lower limit
// on the uptime to avoid uninterruptable reboot loops.
if (delta > base::TimeDelta()) {
- succeeded_callback.Run(nullptr);
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(succeeded_callback, nullptr));
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698