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 #include "tools/battor_agent/battor_agent.h" | 4 #include "tools/battor_agent/battor_agent.h" |
5 | 5 |
6 #include <iomanip> | 6 #include <iomanip> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
10 #include "tools/battor_agent/battor_connection_impl.h" | 10 #include "tools/battor_agent/battor_connection_impl.h" |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 | 510 |
511 // The following actions are required for RecordClockSyncMarker: | 511 // The following actions are required for RecordClockSyncMarker: |
512 case Action::SEND_CURRENT_SAMPLE_REQUEST: | 512 case Action::SEND_CURRENT_SAMPLE_REQUEST: |
513 SendControlMessage(BATTOR_CONTROL_MESSAGE_TYPE_READ_SAMPLE_COUNT, 0, 0); | 513 SendControlMessage(BATTOR_CONTROL_MESSAGE_TYPE_READ_SAMPLE_COUNT, 0, 0); |
514 return; | 514 return; |
515 case Action::READ_CURRENT_SAMPLE: | 515 case Action::READ_CURRENT_SAMPLE: |
516 connection_->ReadMessage(BATTOR_MESSAGE_TYPE_CONTROL_ACK); | 516 connection_->ReadMessage(BATTOR_MESSAGE_TYPE_CONTROL_ACK); |
517 return; | 517 return; |
518 | 518 |
519 case Action::SEND_GIT_HASH_REQUEST: | 519 case Action::SEND_GIT_HASH_REQUEST: |
| 520 connection_->Flush(); |
520 SendControlMessage( | 521 SendControlMessage( |
521 BATTOR_CONTROL_MESSAGE_TYPE_GET_FIRMWARE_GIT_HASH, 0, 0); | 522 BATTOR_CONTROL_MESSAGE_TYPE_GET_FIRMWARE_GIT_HASH, 0, 0); |
522 return; | 523 return; |
523 | 524 |
524 case Action::READ_GIT_HASH: | 525 case Action::READ_GIT_HASH: |
525 connection_->ReadMessage(BATTOR_MESSAGE_TYPE_CONTROL_ACK); | 526 connection_->ReadMessage(BATTOR_MESSAGE_TYPE_CONTROL_ACK); |
526 return; | 527 return; |
527 | 528 |
528 case Action::INVALID: | 529 case Action::INVALID: |
529 NOTREACHED(); | 530 NOTREACHED(); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 if (clock_sync_marker != clock_sync_markers_.end()) | 652 if (clock_sync_marker != clock_sync_markers_.end()) |
652 trace_stream << " <" << clock_sync_marker->second << ">"; | 653 trace_stream << " <" << clock_sync_marker->second << ">"; |
653 | 654 |
654 trace_stream << std::endl; | 655 trace_stream << std::endl; |
655 } | 656 } |
656 | 657 |
657 return trace_stream.str(); | 658 return trace_stream.str(); |
658 } | 659 } |
659 | 660 |
660 } // namespace battor | 661 } // namespace battor |
OLD | NEW |