Index: components/policy/core/common/remote_commands/remote_command_job.cc |
diff --git a/components/policy/core/common/remote_commands/remote_command_job.cc b/components/policy/core/common/remote_commands/remote_command_job.cc |
index fb7caacebea062d8e59863335e5520c9626f61e5..211c4270743d241c648290752697b5434bb11602 100644 |
--- a/components/policy/core/common/remote_commands/remote_command_job.cc |
+++ b/components/policy/core/common/remote_commands/remote_command_job.cc |
@@ -57,6 +57,22 @@ bool RemoteCommandJob::Init(base::TimeTicks now, |
if (!ParseCommandPayload(command.payload())) |
return false; |
+ switch (command.type()) { |
+ case em::RemoteCommand_Type_COMMAND_ECHO_TEST: { |
+ LOG(WARNING) << "Remote echo test command " << unique_id_ |
+ << " initialized."; |
+ break; |
+ } |
+ case em::RemoteCommand_Type_DEVICE_REBOOT: { |
+ LOG(WARNING) << "Remote reboot command " << unique_id_ << " initialized."; |
+ break; |
+ } |
+ case em::RemoteCommand_Type_DEVICE_SCREENSHOT: { |
+ LOG(WARNING) << "Remote screenshot command " << unique_id_ |
+ << " initialized."; |
+ break; |
+ } |
+ } |
status_ = NOT_STARTED; |
return true; |
} |
@@ -65,12 +81,15 @@ bool RemoteCommandJob::Run(base::TimeTicks now, |
const FinishedCallback& finished_callback) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
- if (status_ == INVALID) |
+ if (status_ == INVALID) { |
+ LOG(ERROR) << "Remote command " << unique_id_ << " is invalid."; |
return false; |
+ } |
DCHECK_EQ(NOT_STARTED, status_); |
if (IsExpired(now)) { |
+ LOG(ERROR) << "Remote command " << unique_id_ << " expired."; |
Andrew T Wilson (Slow)
2016/05/04 14:43:23
Maybe also print issued_time() and the current tim
Marton Hunyady
2016/05/09 13:48:15
Done, I'm logging the estimated age of the command
|
status_ = EXPIRED; |
return false; |
} |