ml: migrate mojom to OnceCallback
Callback will be deprecated in generated mojom bindings.
Move to OnceCallback now so it can be compatible with newer libchrome.
BUG=chromium:1054279
TEST=emerge
Change-Id: I00b9972fdd4a32ab704242f385ea561327fa7571
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2154300
Reviewed-by: Andrew Moylan <amoylan@chromium.org>
Tested-by: Qijiang Fan <fqj@google.com>
Commit-Queue: Qijiang Fan <fqj@google.com>
diff --git a/ml/graph_executor_impl.h b/ml/graph_executor_impl.h
index 85cf847..fa4bbf1 100644
--- a/ml/graph_executor_impl.h
+++ b/ml/graph_executor_impl.h
@@ -54,10 +54,10 @@
private:
// chromeos::machine_learning::mojom::GraphExecutor:
void Execute(
- base::flat_map<std::string,
- chromeos::machine_learning::mojom::TensorPtr> inputs,
+ base::flat_map<std::string, chromeos::machine_learning::mojom::TensorPtr>
+ inputs,
const std::vector<std::string>& output_names,
- const ExecuteCallback& callback);
+ ExecuteCallback callback);
const std::map<std::string, int>& required_inputs_;
const std::map<std::string, int>& required_outputs_;