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

Unified Diff: chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc

Issue 2864283002: Use OnceCallback on Mojo interfaces in //components/leak_detector (Closed)
Patch Set: rebase Created 3 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: chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc
diff --git a/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc b/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc
index 2d926822917a44d183377fe384baf430ffe0d8ea..28f3436ab4830c3409a2f01328ab59570611a964 100644
--- a/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc
+++ b/chrome/browser/metrics/leak_detector/leak_detector_remote_controller.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/metrics/leak_detector/leak_detector_remote_controller.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/callback.h"
#include "base/memory/ptr_util.h"
@@ -40,7 +42,7 @@ void LeakDetectorRemoteController::Create(
}
void LeakDetectorRemoteController::GetParams(
- const mojom::LeakDetector::GetParamsCallback& callback) {
+ mojom::LeakDetector::GetParamsCallback callback) {
// If no controller exists, send an empty param protobuf. The remote caller
// should not initialize anything if the params are empty.
MemoryLeakReportProto_Params params;
@@ -56,7 +58,7 @@ void LeakDetectorRemoteController::GetParams(
leak_detector::protobuf_to_mojo_converter::ParamsToMojo(params,
mojo_params.get());
- callback.Run(std::move(mojo_params));
+ std::move(callback).Run(std::move(mojo_params));
}
void LeakDetectorRemoteController::SendLeakReports(
« no previous file with comments | « chrome/browser/metrics/leak_detector/leak_detector_remote_controller.h ('k') | components/metrics/leak_detector/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698