OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/policy/core/common/remote_commands/test_remote_command_job.
h" | 5 #include "components/policy/core/common/remote_commands/test_remote_command_job.
h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
15 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
16 #include "base/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
17 | 17 |
18 namespace policy { | 18 namespace policy { |
19 | 19 |
20 const int kCommandExpirationTimeInHours = 3; | 20 const int kCommandExpirationTimeInHours = 3; |
21 | 21 |
22 namespace em = enterprise_management; | 22 namespace em = enterprise_management; |
23 | 23 |
24 const char TestRemoteCommandJob::kMalformedCommandPayload[] = | 24 const char TestRemoteCommandJob::kMalformedCommandPayload[] = |
25 "_MALFORMED_COMMAND_PAYLOAD_"; | 25 "_MALFORMED_COMMAND_PAYLOAD_"; |
26 | 26 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 const CallbackWithResult& failed_callback) { | 70 const CallbackWithResult& failed_callback) { |
71 std::unique_ptr<ResultPayload> echo_payload( | 71 std::unique_ptr<ResultPayload> echo_payload( |
72 new EchoPayload(command_payload_)); | 72 new EchoPayload(command_payload_)); |
73 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( | 73 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
74 FROM_HERE, base::Bind(succeed_ ? succeed_callback : failed_callback, | 74 FROM_HERE, base::Bind(succeed_ ? succeed_callback : failed_callback, |
75 base::Passed(&echo_payload)), | 75 base::Passed(&echo_payload)), |
76 execution_duration_); | 76 execution_duration_); |
77 } | 77 } |
78 | 78 |
79 } // namespace policy | 79 } // namespace policy |
OLD | NEW |