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

Unified Diff: media/capture/video/scoped_result_callback.h

Issue 2080513002: Deletes mojo::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 | « ipc/mojo/ipc_mojo_bootstrap.cc ('k') | media/capture/video/video_capture_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/video/scoped_result_callback.h
diff --git a/media/capture/video/scoped_result_callback.h b/media/capture/video/scoped_result_callback.h
index 59727ed05f4b6293da1bff8febe7b6f9a1cbce42..af4edc1740504fa04b343400a30ee6a8d7deba88 100644
--- a/media/capture/video/scoped_result_callback.h
+++ b/media/capture/video/scoped_result_callback.h
@@ -5,9 +5,9 @@
#ifndef MEDIA_CAPTURE_VIDEO_SCOPED_RESULT_CALLBACK_H_
#define MEDIA_CAPTURE_VIDEO_SCOPED_RESULT_CALLBACK_H_
-#include "base/callback_forward.h"
+#include "base/callback.h"
+#include "base/callback_helpers.h"
#include "base/macros.h"
-#include "mojo/public/cpp/bindings/callback.h"
namespace media {
@@ -41,10 +41,7 @@ class ScopedResultCallback {
template <typename... Args>
void Run(Args... args) {
on_error_callback_.Reset();
- // TODO(mcasas): Use base::ResetAndReturn() when mojo::Callback<> is
- // compatible with base::Callback<>, see https://crbug.com/596521.
- callback_.Run(std::forward<Args>(args)...);
- callback_.Reset();
+ base::ResetAndReturn(&callback_).Run(std::forward<Args>(args)...);
}
private:
« no previous file with comments | « ipc/mojo/ipc_mojo_bootstrap.cc ('k') | media/capture/video/video_capture_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698