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

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: Initial draft Created 4 years, 7 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
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 357ad6c3a99824109244ca79972ceac228e1aeff..cb123e488c533a9119a3b0d7df42b17594e87226 100644
--- a/tools/battor_agent/battor_connection_impl.cc
+++ b/tools/battor_agent/battor_connection_impl.cc
@@ -171,6 +171,10 @@ void BattOrConnectionImpl::ReadMessage(BattOrMessageType type) {
BeginReadBytes(max_bytes_to_read - already_read_buffer_.size());
}
+void BattOrConnectionImpl::CancelReadMessage() {
+ io_handler_->CancelRead(device::serial::ReceiveError::NONE);
charliea (OOO until 10-5) 2016/05/23 14:08:52 Think it might be more accurate to cancel it w/ Re
aschulman 2016/06/10 07:22:59 Done.
+}
+
void BattOrConnectionImpl::Flush() {
io_handler_->Flush();
already_read_buffer_.clear();

Powered by Google App Engine
This is Rietveld 408576698