[cef][wam] Make the recipe work with official chromium release tarballs
[AGL/meta-agl-demo.git] / recipes-wam / cef / files / chromium / 0023-M118-fix-Add-missing-typename-keyword-in-multiple-st.patch
1 From a1077aa6d029f729143727ab8d25f85121f871a3 Mon Sep 17 00:00:00 2001
2 From: Roger Zanoni <rzanoni@igalia.com>
3 Date: Thu, 26 Oct 2023 07:43:26 -0300
4 Subject: [PATCH 23/33] [M118-fix] Add missing 'typename' keyword in multiple
5  statements
6
7 Add the typename keywork where it's needed as this causes build issues
8 in clang 14.
9
10 Upstream-Status: Inappropriate
11 Signed-off-by: Roger Zanoni <rzanoni@igalia.com>
12 ---
13  .../optimization_guide/core/tflite_model_executor.h       | 8 ++++----
14  components/supervised_user/core/browser/proto_fetcher.cc  | 6 +++---
15  components/supervised_user/core/browser/proto_fetcher.h   | 4 ++--
16  ui/base/interaction/interactive_test_internal.h           | 6 +++---
17  4 files changed, 12 insertions(+), 12 deletions(-)
18
19 diff --git a/components/optimization_guide/core/tflite_model_executor.h b/components/optimization_guide/core/tflite_model_executor.h
20 index 027ae8e101634..a256a85322e54 100644
21 --- a/components/optimization_guide/core/tflite_model_executor.h
22 +++ b/components/optimization_guide/core/tflite_model_executor.h
23 @@ -262,7 +262,7 @@ class TFLiteModelExecutor : public ModelExecutor<OutputType, InputType> {
24    // Starts the synchronous execution of the model. Returns model outputs.
25    // Model needs to be loaded. Synchronous calls do not load or unload model.
26    std::vector<absl::optional<OutputType>> SendForBatchExecutionSync(
27 -      ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
28 +      typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
29        override {
30      DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
31      DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
32 @@ -417,7 +417,7 @@ class TFLiteModelExecutor : public ModelExecutor<OutputType, InputType> {
33    // executes it on the model execution thread.
34    void LoadModelFileAndBatchExecute(
35        BatchExecutionCallback callback_on_complete,
36 -      ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) {
37 +      typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) {
38      DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
39      DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
40  
41 @@ -434,7 +434,7 @@ class TFLiteModelExecutor : public ModelExecutor<OutputType, InputType> {
42  
43    // Batch executes the loaded model for inputs.
44    void BatchExecuteLoadedModel(
45 -      ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
46 +      typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
47        std::vector<absl::optional<OutputType>>* outputs) {
48      DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
49      DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
50 @@ -494,7 +494,7 @@ class TFLiteModelExecutor : public ModelExecutor<OutputType, InputType> {
51    // Unloads the model if needed.
52    void BatchExecuteLoadedModelAndRunCallback(
53        BatchExecutionCallback callback_on_complete,
54 -      ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
55 +      typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
56        ExecutionStatus execution_status) {
57      DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
58      DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
59 diff --git a/components/supervised_user/core/browser/proto_fetcher.cc b/components/supervised_user/core/browser/proto_fetcher.cc
60 index 9c8e7b5cb88f4..92a614d75b579 100644
61 --- a/components/supervised_user/core/browser/proto_fetcher.cc
62 +++ b/components/supervised_user/core/browser/proto_fetcher.cc
63 @@ -399,7 +399,7 @@ class RetryingFetcherImpl final : public DeferredFetcherImpl<Response> {
64    RetryingFetcherImpl(const RetryingFetcherImpl&) = delete;
65    RetryingFetcherImpl& operator=(const RetryingFetcherImpl&) = delete;
66  
67 -  void Start(ProtoFetcher<Response>::Callback callback) override {
68 +  void Start(typename ProtoFetcher<Response>::Callback callback) override {
69      callback_ = std::move(callback);
70      Retry();
71    }
72 @@ -435,7 +435,7 @@ class RetryingFetcherImpl final : public DeferredFetcherImpl<Response> {
73    }
74  
75    // Client callback.
76 -  ProtoFetcher<Response>::Callback callback_;
77 +  typename ProtoFetcher<Response>::Callback callback_;
78  
79    // Retry controls.
80    base::OneShotTimer timer_;
81 @@ -578,7 +578,7 @@ ParallelFetchManager<Request, Response>::ParallelFetchManager(
82  template <typename Request, typename Response>
83  void ParallelFetchManager<Request, Response>::Fetch(
84      const Request& request,
85 -    Fetcher::Callback callback) {
86 +    typename Fetcher::Callback callback) {
87    CHECK(callback) << "Use base::DoNothing() instead of empty callback.";
88    KeyType key = requests_in_flight_.Add(MakeFetcher(request));
89    requests_in_flight_.Lookup(key)->Start(
90 diff --git a/components/supervised_user/core/browser/proto_fetcher.h b/components/supervised_user/core/browser/proto_fetcher.h
91 index 8266c99d78a7a..9c41978aea68e 100644
92 --- a/components/supervised_user/core/browser/proto_fetcher.h
93 +++ b/components/supervised_user/core/browser/proto_fetcher.h
94 @@ -165,10 +165,10 @@ class ParallelFetchManager {
95  
96    // Starts the fetch. Underlying fetcher is stored internally, and will be
97    // cleaned up after finish or when this manager is destroyed.
98 -  void Fetch(const Request& request, Fetcher::Callback callback);
99 +  void Fetch(const Request& request, typename Fetcher::Callback callback);
100  
101   private:
102 -  using KeyType = base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
103 +  using KeyType = typename base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
104  
105    // Remove fetcher under key from requests_in_flight_.
106    void Remove(KeyType key);
107 diff --git a/ui/base/interaction/interactive_test_internal.h b/ui/base/interaction/interactive_test_internal.h
108 index 080152fa265cd..a3c9b22f79487 100644
109 --- a/ui/base/interaction/interactive_test_internal.h
110 +++ b/ui/base/interaction/interactive_test_internal.h
111 @@ -108,7 +108,7 @@ class InteractiveTestPrivate {
112  
113    // Adds `state_observer` and associates it with an element with identifier
114    // `id` and context `context`.
115 -  template <typename Observer, typename V = Observer::ValueType>
116 +  template <typename Observer, typename V = typename Observer::ValueType>
117    void AddStateObserver(ElementIdentifier id,
118                          ElementContext context,
119                          std::unique_ptr<Observer> state_observer);
120 @@ -457,7 +457,7 @@ struct ArgsExtractor<R(Args...)> {
121  };
122  
123  template <typename F>
124 -using ReturnTypeOf = MaybeBindTypeHelper<F>::ReturnType;
125 +using ReturnTypeOf = typename MaybeBindTypeHelper<F>::ReturnType;
126  
127  template <size_t N, typename F>
128  using NthArgumentOf = std::tuple_element_t<
129 @@ -556,7 +556,7 @@ struct MatcherTypeHelper<const char16_t[]> {
130  };
131  
132  template <typename T>
133 -using MatcherTypeFor = MatcherTypeHelper<std::remove_cvref_t<T>>::ActualType;
134 +using MatcherTypeFor = typename MatcherTypeHelper<std::remove_cvref_t<T>>::ActualType;
135  
136  template <typename T>
137  class IsMatcherHelper {
138 -- 
139 2.42.1
140