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

Unified Diff: device/serial/data_receiver.cc

Issue 1212023004: Convert all usages of mojo::ErrorHandler in //device/serial to callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « device/serial/data_receiver.h ('k') | device/serial/data_sender.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/data_receiver.cc
diff --git a/device/serial/data_receiver.cc b/device/serial/data_receiver.cc
index 2f238e317d31251155a900b76000b5a7b2cfecb8..82d0153fe287dfcca74b0cdd025e7631c751e9f3 100644
--- a/device/serial/data_receiver.cc
+++ b/device/serial/data_receiver.cc
@@ -117,9 +117,11 @@ DataReceiver::DataReceiver(
fatal_error_value_(fatal_error_value),
shut_down_(false),
weak_factory_(this) {
- source_.set_error_handler(this);
+ source_.set_connection_error_handler(
+ base::Bind(&DataReceiver::OnConnectionError, base::Unretained(this)));
source_->Init(buffer_size);
- client_.set_error_handler(this);
+ client_.set_connection_error_handler(
+ base::Bind(&DataReceiver::OnConnectionError, base::Unretained(this)));
}
bool DataReceiver::Receive(const ReceiveDataCallback& callback,
« no previous file with comments | « device/serial/data_receiver.h ('k') | device/serial/data_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698