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

Unified Diff: tools/battor_agent/battor_connection_impl.cc

Issue 1991403002: [battor agent] Fix the init sequence so it retries inits instead of resets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comment Created 4 years, 6 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 | « tools/battor_agent/battor_connection_impl.h ('k') | tools/battor_agent/battor_error.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/battor_agent/battor_connection_impl.cc
diff --git a/tools/battor_agent/battor_connection_impl.cc b/tools/battor_agent/battor_connection_impl.cc
index cc113a982906f354db84011fe34451bed2c0327e..cf33c2ab97b18e1359f077f192117aae2840b6b5 100644
--- a/tools/battor_agent/battor_connection_impl.cc
+++ b/tools/battor_agent/battor_connection_impl.cc
@@ -181,6 +181,10 @@ void BattOrConnectionImpl::ReadMessage(BattOrMessageType type) {
BeginReadBytes(message_max_bytes - already_read_buffer_.size());
}
+void BattOrConnectionImpl::CancelReadMessage() {
+ io_handler_->CancelRead(device::serial::ReceiveError::TIMEOUT);
+}
+
void BattOrConnectionImpl::Flush() {
io_handler_->Flush();
already_read_buffer_.clear();
« no previous file with comments | « tools/battor_agent/battor_connection_impl.h ('k') | tools/battor_agent/battor_error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698