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

Unified Diff: mojo/public/cpp/bindings/connection_error_callback.h

Issue 2932193002: Use OnceCallback for Mojo binding connection error handlers. (Closed)
Patch Set: Call Run() on rvalue. Created 3 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/binding_set.h ('k') | mojo/public/cpp/bindings/connector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/connection_error_callback.h
diff --git a/mojo/public/cpp/bindings/connection_error_callback.h b/mojo/public/cpp/bindings/connection_error_callback.h
index 306e99e45b3462478b759afba74fb794dfa75dc1..0b9759e6d9e40faff80cb7a75ea15cf10e16c562 100644
--- a/mojo/public/cpp/bindings/connection_error_callback.h
+++ b/mojo/public/cpp/bindings/connection_error_callback.h
@@ -9,12 +9,15 @@
namespace mojo {
-// This callback type accepts user-defined disconnect reason and description. If
-// the other side specifies a reason on closing the connection, it will be
+// These callback types accept user-defined disconnect reason and description.
+// If the other side specifies a reason on closing the connection, it will be
// passed to the error handler.
using ConnectionErrorWithReasonCallback =
- base::Callback<void(uint32_t /* custom_reason */,
- const std::string& /* description */)>;
+ base::OnceCallback<void(uint32_t /* custom_reason */,
+ const std::string& /* description */)>;
+using RepeatingConnectionErrorWithReasonCallback =
+ base::RepeatingCallback<void(uint32_t /* custom_reason */,
+ const std::string& /* description */)>;
} // namespace mojo
« no previous file with comments | « mojo/public/cpp/bindings/binding_set.h ('k') | mojo/public/cpp/bindings/connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698