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

Unified Diff: mojo/public/cpp/bindings/lib/router.cc

Issue 2062333002: mojo::Callback -> base::Callback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 | « mojo/public/cpp/bindings/lib/multiplex_router.cc ('k') | mojo/public/cpp/bindings/lib/shared_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/router.cc
diff --git a/mojo/public/cpp/bindings/lib/router.cc b/mojo/public/cpp/bindings/lib/router.cc
index da5f34b1df57ce4bbfaf8668061d2bbde6bc3e49..2fcc7d74131987ef5f4f1fa39725df8bde5b3e47 100644
--- a/mojo/public/cpp/bindings/lib/router.cc
+++ b/mojo/public/cpp/bindings/lib/router.cc
@@ -133,7 +133,8 @@ Router::Router(ScopedMessagePipeHandle message_pipe,
if (expects_sync_requests)
connector_.AllowWokenUpBySyncWatchOnSameThread();
connector_.set_incoming_receiver(filters_.GetHead());
- connector_.set_connection_error_handler([this]() { OnConnectionError(); });
+ connector_.set_connection_error_handler(
+ base::Bind(&Router::OnConnectionError, base::Unretained(this)));
}
Router::~Router() {}
@@ -309,7 +310,8 @@ void Router::OnConnectionError() {
}
encountered_error_ = true;
- error_handler_.Run();
+ if (!error_handler_.is_null())
+ error_handler_.Run();
}
// ----------------------------------------------------------------------------
« no previous file with comments | « mojo/public/cpp/bindings/lib/multiplex_router.cc ('k') | mojo/public/cpp/bindings/lib/shared_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698