diff options
| author | 2021-05-26 15:48:52 +0900 | |
|---|---|---|
| committer | 2021-05-26 17:27:11 +0900 | |
| commit | f08305af653affcd7a18f2bf0f983411fd025b62 (patch) | |
| tree | 4347418fbde6e17bb3492d585c33931240f8b9de | |
| parent | 5ddb93e738afe8e93358533ef51a076246646c52 (diff) | |
Update for Chrome OS libchrome uprev.
* base/bind_helpers.h
All utilities of base/bind_helpers.h will be moved to
base/callback_helpers.h. Add a wrapper header for system/bt.
* using base::MakeUnboundRunType
base::MakeUnboundRunType is now in base::internal namespace. Use
internal namespace as temporary workaround.
This change should be no-op to Android.
Chrome OS Bug: crbug/2742042
Bug: 189293646
Tag: #floss
Test: CrOS zork-floss-cq ci.chromium.org/ui/b/8846190456959373168
Change-Id: Ia37528fcc56300a45b21e74937e6a21eb8026f84
| -rw-r--r-- | system/bta/vc/vc.cc | 2 | ||||
| -rw-r--r-- | system/bta/vc/vc_test.cc | 2 | ||||
| -rw-r--r-- | system/common/once_timer_unittest.cc | 2 | ||||
| -rw-r--r-- | system/common/repeating_timer_unittest.cc | 2 | ||||
| -rw-r--r-- | system/gd/common/bind.h | 5 | ||||
| -rw-r--r-- | system/include/bind_helpers.h | 22 | ||||
| -rw-r--r-- | system/service/gatt_server_old.cc | 3 | ||||
| -rw-r--r-- | system/service/low_energy_advertiser.cc | 3 | ||||
| -rw-r--r-- | system/stack/btm/btm_ble_adv_filter.cc | 3 | ||||
| -rw-r--r-- | system/stack/btm/btm_ble_multi_adv.cc | 3 | ||||
| -rw-r--r-- | system/stack/btm/btm_iso_impl.h | 2 | ||||
| -rw-r--r-- | system/stack/eatt/eatt_impl.h | 2 | ||||
| -rw-r--r-- | system/stack/test/common/mock_gatt_layer.h | 2 | ||||
| -rw-r--r-- | system/stack/test/eatt/eatt_test.cc | 2 | ||||
| -rw-r--r-- | system/test/mock/mock_bta_vc.cc | 2 | ||||
| -rw-r--r-- | system/test/mock/mock_stack_btm_ble_adv_filter.cc | 2 | ||||
| -rw-r--r-- | system/test/mock/mock_stack_btm_ble_multi_adv.cc | 2 |
17 files changed, 46 insertions, 15 deletions
diff --git a/system/bta/vc/vc.cc b/system/bta/vc/vc.cc index ee94613958..eca4e3ebb1 100644 --- a/system/bta/vc/vc.cc +++ b/system/bta/vc/vc.cc @@ -16,7 +16,6 @@ */ #include <base/bind.h> -#include <base/bind_helpers.h> #include <base/logging.h> #include <base/strings/string_number_conversions.h> #include <hardware/bt_vc.h> @@ -24,6 +23,7 @@ #include <string> #include <vector> +#include "bind_helpers.h" #include "bta_gatt_api.h" #include "bta_gatt_queue.h" #include "bta_vc_api.h" diff --git a/system/bta/vc/vc_test.cc b/system/bta/vc/vc_test.cc index 1d45fa881c..dadea5768a 100644 --- a/system/bta/vc/vc_test.cc +++ b/system/bta/vc/vc_test.cc @@ -16,10 +16,10 @@ */ #include <base/bind.h> -#include <base/bind_helpers.h> #include <gmock/gmock.h> #include <gtest/gtest.h> +#include "bind_helpers.h" #include "bta_gatt_api_mock.h" #include "bta_gatt_queue_mock.h" #include "bta_vc_api.h" diff --git a/system/common/once_timer_unittest.cc b/system/common/once_timer_unittest.cc index d0fa238803..720474efe2 100644 --- a/system/common/once_timer_unittest.cc +++ b/system/common/once_timer_unittest.cc @@ -15,11 +15,11 @@ */ #include <base/bind.h> -#include <base/bind_helpers.h> #include <base/logging.h> #include <gtest/gtest.h> #include <future> +#include "bind_helpers.h" #include "message_loop_thread.h" #include "once_timer.h" diff --git a/system/common/repeating_timer_unittest.cc b/system/common/repeating_timer_unittest.cc index 50520cd73e..7bf4bbc6fd 100644 --- a/system/common/repeating_timer_unittest.cc +++ b/system/common/repeating_timer_unittest.cc @@ -15,11 +15,11 @@ */ #include <base/bind.h> -#include <base/bind_helpers.h> #include <base/logging.h> #include <gtest/gtest.h> #include <future> +#include "bind_helpers.h" #include "message_loop_thread.h" #include "repeating_timer.h" diff --git a/system/gd/common/bind.h b/system/gd/common/bind.h index e65d830325..e46d3d2c98 100644 --- a/system/gd/common/bind.h +++ b/system/gd/common/bind.h @@ -24,7 +24,12 @@ namespace common { using base::Bind; using base::BindOnce; using base::IgnoreResult; +#if defined(BASE_VER) && BASE_VER >= 860220 +// TODO(b/189293646): find a way to avoid base::internal. +using base::internal::MakeUnboundRunType; +#else using base::MakeUnboundRunType; +#endif using base::Owned; using base::Passed; using base::RetainedRef; diff --git a/system/include/bind_helpers.h b/system/include/bind_helpers.h new file mode 100644 index 0000000000..c92d8f768e --- /dev/null +++ b/system/include/bind_helpers.h @@ -0,0 +1,22 @@ +// +// Copyright 2021 Google, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at: +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#pragma once + +#if defined(BASE_VER) && BASE_VER >= 860220 +#include <base/callback_helpers.h> +#else +#include <base/bind_helpers.h> +#endif diff --git a/system/service/gatt_server_old.cc b/system/service/gatt_server_old.cc index d72be583c3..a460943843 100644 --- a/system/service/gatt_server_old.cc +++ b/system/service/gatt_server_old.cc @@ -23,7 +23,6 @@ #include <unistd.h> #include <base/bind.h> -#include <base/bind_helpers.h> #include <base/callback.h> #include <algorithm> #include <array> @@ -40,6 +39,8 @@ #include <hardware/bluetooth.h> #include <hardware/bt_gatt.h> +#include "bind_helpers.h" + #include "service/hal/bluetooth_interface.h" #include "service/logging_helpers.h" diff --git a/system/service/low_energy_advertiser.cc b/system/service/low_energy_advertiser.cc index 7bc5f259c6..57912b7746 100644 --- a/system/service/low_energy_advertiser.cc +++ b/system/service/low_energy_advertiser.cc @@ -22,10 +22,11 @@ #include "stack/include/hcidefs.h" #include <base/bind.h> -#include <base/bind_helpers.h> #include <base/callback.h> #include <base/logging.h> +#include "bind_helpers.h" + using std::lock_guard; using std::mutex; diff --git a/system/stack/btm/btm_ble_adv_filter.cc b/system/stack/btm/btm_ble_adv_filter.cc index e9e88343bc..6600d18010 100644 --- a/system/stack/btm/btm_ble_adv_filter.cc +++ b/system/stack/btm/btm_ble_adv_filter.cc @@ -37,7 +37,8 @@ #include <vector> #include <base/bind.h> -#include <base/bind_helpers.h> + +#include "bind_helpers.h" extern tBTM_CB btm_cb; diff --git a/system/stack/btm/btm_ble_multi_adv.cc b/system/stack/btm/btm_ble_multi_adv.cc index ce8f7ba0d5..a7361f550c 100644 --- a/system/stack/btm/btm_ble_multi_adv.cc +++ b/system/stack/btm/btm_ble_multi_adv.cc @@ -31,13 +31,14 @@ #include <vector> #include <base/bind.h> -#include <base/bind_helpers.h> #include <base/location.h> #include <base/logging.h> #include <base/memory/weak_ptr.h> #include <base/strings/string_number_conversions.h> #include <base/time/time.h> +#include "bind_helpers.h" + using base::Bind; using base::TimeDelta; using base::TimeTicks; diff --git a/system/stack/btm/btm_iso_impl.h b/system/stack/btm/btm_iso_impl.h index c0b6a1ca97..2d2613e07e 100644 --- a/system/stack/btm/btm_iso_impl.h +++ b/system/stack/btm/btm_iso_impl.h @@ -22,8 +22,8 @@ #include <set> #include "base/bind.h" -#include "base/bind_helpers.h" #include "base/callback.h" +#include "bind_helpers.h" #include "bt_types.h" #include "btm_iso_api.h" #include "btu.h" diff --git a/system/stack/eatt/eatt_impl.h b/system/stack/eatt/eatt_impl.h index 25799abbc4..f50cb34b41 100644 --- a/system/stack/eatt/eatt_impl.h +++ b/system/stack/eatt/eatt_impl.h @@ -19,7 +19,7 @@ #include <queue> #include "acl_api.h" -#include "base/bind_helpers.h" +#include "bind_helpers.h" #include "bt_types.h" #include "device/include/controller.h" #include "eatt.h" diff --git a/system/stack/test/common/mock_gatt_layer.h b/system/stack/test/common/mock_gatt_layer.h index 255f43d1ee..bcdaebc546 100644 --- a/system/stack/test/common/mock_gatt_layer.h +++ b/system/stack/test/common/mock_gatt_layer.h @@ -18,7 +18,7 @@ #include <gmock/gmock.h> -#include "base/bind_helpers.h" +#include "bind_helpers.h" #include "stack/gatt/gatt_int.h" namespace bluetooth { diff --git a/system/stack/test/eatt/eatt_test.cc b/system/stack/test/eatt/eatt_test.cc index 8e93227da8..8ab0759cf9 100644 --- a/system/stack/test/eatt/eatt_test.cc +++ b/system/stack/test/eatt/eatt_test.cc @@ -20,7 +20,7 @@ #include <vector> -#include "base/bind_helpers.h" +#include "bind_helpers.h" #include "btm_api.h" #include "l2c_api.h" #include "mock_btif_storage.h" diff --git a/system/test/mock/mock_bta_vc.cc b/system/test/mock/mock_bta_vc.cc index 4a702739fd..b47f5497b6 100644 --- a/system/test/mock/mock_bta_vc.cc +++ b/system/test/mock/mock_bta_vc.cc @@ -25,12 +25,12 @@ extern std::map<std::string, int> mock_function_count_map; #include <base/bind.h> -#include <base/bind_helpers.h> #include <base/logging.h> #include <base/strings/string_number_conversions.h> #include <hardware/bt_vc.h> #include <string> #include <vector> +#include "bind_helpers.h" #include "bta/include/bta_gatt_api.h" #include "bta/include/bta_gatt_queue.h" #include "bta/include/bta_vc_api.h" diff --git a/system/test/mock/mock_stack_btm_ble_adv_filter.cc b/system/test/mock/mock_stack_btm_ble_adv_filter.cc index b36a894e9e..8d53a80704 100644 --- a/system/test/mock/mock_stack_btm_ble_adv_filter.cc +++ b/system/test/mock/mock_stack_btm_ble_adv_filter.cc @@ -25,10 +25,10 @@ extern std::map<std::string, int> mock_function_count_map; #include <base/bind.h> -#include <base/bind_helpers.h> #include <string.h> #include <algorithm> #include <vector> +#include "bind_helpers.h" #include "bt_target.h" #include "bt_types.h" #include "btm_ble_api.h" diff --git a/system/test/mock/mock_stack_btm_ble_multi_adv.cc b/system/test/mock/mock_stack_btm_ble_multi_adv.cc index aa8c54fb73..f6f25ed1ca 100644 --- a/system/test/mock/mock_stack_btm_ble_multi_adv.cc +++ b/system/test/mock/mock_stack_btm_ble_multi_adv.cc @@ -25,7 +25,6 @@ extern std::map<std::string, int> mock_function_count_map; #include <base/bind.h> -#include <base/bind_helpers.h> #include <base/location.h> #include <base/logging.h> #include <base/memory/weak_ptr.h> @@ -34,6 +33,7 @@ extern std::map<std::string, int> mock_function_count_map; #include <string.h> #include <queue> #include <vector> +#include "bind_helpers.h" #include "ble_advertiser.h" #include "bt_target.h" #include "device/include/controller.h" |