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/remote_command_job.h" | 5 #include "components/policy/core/common/remote_commands/remote_command_job.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/syslog_logging.h" | 10 #include "base/syslog_logging.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 case em::RemoteCommand_Type_DEVICE_SCREENSHOT: { | 73 case em::RemoteCommand_Type_DEVICE_SCREENSHOT: { |
74 SYSLOG(INFO) << "Remote screenshot command " << unique_id_ | 74 SYSLOG(INFO) << "Remote screenshot command " << unique_id_ |
75 << " initialized."; | 75 << " initialized."; |
76 break; | 76 break; |
77 } | 77 } |
78 case em::RemoteCommand_Type_DEVICE_SET_VOLUME: { | 78 case em::RemoteCommand_Type_DEVICE_SET_VOLUME: { |
79 SYSLOG(INFO) << "Remote set volume command " << unique_id_ | 79 SYSLOG(INFO) << "Remote set volume command " << unique_id_ |
80 << " initialized."; | 80 << " initialized."; |
81 break; | 81 break; |
82 } | 82 } |
| 83 case em::RemoteCommand_Type_DEVICE_FETCH_STATUS: { |
| 84 SYSLOG(INFO) << "Remote fetch device status command " << unique_id_ |
| 85 << " initialized."; |
| 86 break; |
| 87 } |
83 } | 88 } |
84 status_ = NOT_STARTED; | 89 status_ = NOT_STARTED; |
85 return true; | 90 return true; |
86 } | 91 } |
87 | 92 |
88 bool RemoteCommandJob::Run(base::TimeTicks now, | 93 bool RemoteCommandJob::Run(base::TimeTicks now, |
89 const FinishedCallback& finished_callback) { | 94 const FinishedCallback& finished_callback) { |
90 DCHECK(thread_checker_.CalledOnValidThread()); | 95 DCHECK(thread_checker_.CalledOnValidThread()); |
91 | 96 |
92 if (status_ == INVALID) { | 97 if (status_ == INVALID) { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 DCHECK_EQ(RUNNING, status_); | 181 DCHECK_EQ(RUNNING, status_); |
177 status_ = succeeded ? SUCCEEDED : FAILED; | 182 status_ = succeeded ? SUCCEEDED : FAILED; |
178 | 183 |
179 result_payload_ = std::move(result_payload); | 184 result_payload_ = std::move(result_payload); |
180 | 185 |
181 if (!finished_callback_.is_null()) | 186 if (!finished_callback_.is_null()) |
182 finished_callback_.Run(); | 187 finished_callback_.Run(); |
183 } | 188 } |
184 | 189 |
185 } // namespace policy | 190 } // namespace policy |
OLD | NEW |