BEGIN_PUBLIC

Microsoft has updated the winrt library
END_PUBLC

PiperOrigin-RevId: 387168248
This commit is contained in:
hai007
2021-07-29 03:27:37 -07:00
committed by Janusz Sobczak
parent 09e65aeddb
commit b1815095dd
1579 changed files with 967 additions and 20157 deletions
+8 -7
View File
@@ -1,3 +1,6 @@
load("//ads/util/non_compile:non_compile.bzl", "cc_with_non_compile_test")
licenses(["notice"])
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,8 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
load("//ads/util/non_compile:non_compile.bzl", "cc_with_non_compile_test")
cc_library(
name = "base",
srcs = [
@@ -75,9 +76,9 @@ cc_library(
],
deps = [
":base",
"//platform/api:types",
"//absl/base:core_headers",
"//absl/strings:str_format",
"//platform/api:types",
],
)
@@ -137,10 +138,10 @@ cc_library(
deps = [
":base",
":logging",
"//platform/api:comm",
"//platform/public:types",
"//absl/container:flat_hash_map",
"//absl/strings",
"//platform/api:comm",
"//platform/public:types",
],
)
@@ -155,8 +156,8 @@ cc_test(
deps = [
":base",
":test_util",
"//platform/impl/g3", # build_cleaner: keep
"//testing/base/public:gunit_main",
"//platform/impl/g3", # build_cleaner: keep
],
)
@@ -181,8 +182,8 @@ cc_test(
":base",
":cancellation_flag",
":test_util",
"//platform/impl/g3", # build_cleaner: keep
"//testing/base/public:gunit_main",
"//platform/impl/g3", # build_cleaner: keep
],
)
+1 -1
View File
@@ -14,8 +14,8 @@
#include "platform/base/base64_utils.h"
#include "platform/base/byte_array.h"
#include "absl/strings/escaping.h"
#include "platform/base/byte_array.h"
namespace location {
namespace nearby {
+1 -1
View File
@@ -15,8 +15,8 @@
#ifndef PLATFORM_BASE_BASE64_UTILS_H_
#define PLATFORM_BASE_BASE64_UTILS_H_
#include "platform/base/byte_array.h"
#include "absl/strings/string_view.h"
#include "platform/base/byte_array.h"
namespace location {
namespace nearby {
+1 -1
View File
@@ -15,8 +15,8 @@
#ifndef PLATFORM_BASE_BASE_MUTEX_LOCK_H_
#define PLATFORM_BASE_BASE_MUTEX_LOCK_H_
#include "platform/api/mutex.h"
#include "absl/base/thread_annotations.h"
#include "platform/api/mutex.h"
namespace location {
namespace nearby {
+3 -7
View File
@@ -19,13 +19,13 @@
#include <deque>
#include <memory>
#include "absl/base/thread_annotations.h"
#include "platform/api/condition_variable.h"
#include "platform/api/mutex.h"
#include "platform/base/byte_array.h"
#include "platform/base/exception.h"
#include "platform/base/input_stream.h"
#include "platform/base/output_stream.h"
#include "absl/base/thread_annotations.h"
namespace location {
namespace nearby {
@@ -80,9 +80,7 @@ class BasePipe {
ExceptionOr<ByteArray> Read(std::int64_t size) override {
return pipe_->Read(size);
}
Exception Close() override {
return DoClose();
}
Exception Close() override { return DoClose(); }
private:
Exception DoClose() {
@@ -100,9 +98,7 @@ class BasePipe {
return pipe_->Write(data);
}
Exception Flush() override { return {Exception::kSuccess}; }
Exception Close() override {
return DoClose();
}
Exception Close() override { return DoClose(); }
private:
Exception DoClose() {
+1 -1
View File
@@ -15,8 +15,8 @@
#ifndef PLATFORM_BASE_BLUETOOTH_UTILS_H_
#define PLATFORM_BASE_BLUETOOTH_UTILS_H_
#include "platform/base/byte_array.h"
#include "absl/strings/string_view.h"
#include "platform/base/byte_array.h"
namespace location {
namespace nearby {
+4 -4
View File
@@ -24,8 +24,8 @@ constexpr char kBluetoothMacAddressBytes[] = {0x00, 0x00, 0xe6,
0x88, 0x64, 0x13};
TEST(BluetoothUtilsTest, ToStringWorks) {
ByteArray bt_mac_address_bytes{
kBluetoothMacAddressBytes, sizeof(kBluetoothMacAddressBytes)};
ByteArray bt_mac_address_bytes{kBluetoothMacAddressBytes,
sizeof(kBluetoothMacAddressBytes)};
auto bt_mac_address = BluetoothUtils::ToString(bt_mac_address_bytes);
@@ -33,8 +33,8 @@ TEST(BluetoothUtilsTest, ToStringWorks) {
}
TEST(BluetoothUtilsTest, FromStringWorks) {
ByteArray bt_mac_address_bytes{
kBluetoothMacAddressBytes, sizeof(kBluetoothMacAddressBytes)};
ByteArray bt_mac_address_bytes{kBluetoothMacAddressBytes,
sizeof(kBluetoothMacAddressBytes)};
auto bt_mac_address_bytes_result =
BluetoothUtils::FromString(kBluetoothMacAddress);
+1 -1
View File
@@ -16,8 +16,8 @@
#include <cstdlib>
#include "platform/base/base_input_stream.h"
#include "absl/strings/str_format.h"
#include "platform/base/base_input_stream.h"
namespace location {
namespace nearby {
+1 -1
View File
@@ -14,8 +14,8 @@
#include "platform/base/byte_utils.h"
#include "platform/base/byte_array.h"
#include "gtest/gtest.h"
#include "platform/base/byte_array.h"
namespace location {
namespace nearby {
+1 -3
View File
@@ -28,9 +28,7 @@ CancellationFlag::CancellationFlag(bool cancelled) {
cancelled_ = cancelled;
}
CancellationFlag::~CancellationFlag() {
listeners_.clear();
}
CancellationFlag::~CancellationFlag() { listeners_.clear(); }
void CancellationFlag::Cancel() {
// Return immediately as no-op if feature flag is not enabled.
+3 -3
View File
@@ -16,11 +16,11 @@
#include <memory>
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "platform/base/cancellation_flag_listener.h"
#include "platform/base/feature_flags.h"
#include "platform/base/medium_environment.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
namespace location {
namespace nearby {
@@ -162,7 +162,7 @@ TEST(CancellationFlagTest,
CancellationFlag::CancelListener cancel_callback =
mock_cancel_callback.AsStdFunction();
CancellationFlag::CancelListener *callback_pointer_1 = &cancel_callback;
CancellationFlag::CancelListener* callback_pointer_1 = &cancel_callback;
auto callback_pointer_2 =
std::make_unique<CancellationFlag::CancelListener>();
*callback_pointer_2 = cancel_callback;
+1 -1
View File
@@ -16,9 +16,9 @@
#include <vector>
#include "platform/base/exception_test.nc.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "platform/base/exception_test.nc.h"
namespace location::nearby {
+1 -1
View File
@@ -14,8 +14,8 @@
#include "platform/base/feature_flags.h"
#include "platform/base/medium_environment.h"
#include "gtest/gtest.h"
#include "platform/base/medium_environment.h"
namespace location {
namespace nearby {
+1 -2
View File
@@ -41,8 +41,7 @@ class LogMessageVoidify {
// Severity enum conversion
#define NEARBY_SEVERITY_VERBOSE \
location::nearby::api::LogMessage::Severity::kVerbose
#define NEARBY_SEVERITY_INFO \
location::nearby::api::LogMessage::Severity::kInfo
#define NEARBY_SEVERITY_INFO location::nearby::api::LogMessage::Severity::kInfo
#define NEARBY_SEVERITY_WARNING \
location::nearby::api::LogMessage::Severity::kWarning
#define NEARBY_SEVERITY_ERROR \
+9 -11
View File
@@ -457,17 +457,15 @@ void MediumEnvironment::RegisterWebRtcSignalingMessenger(
absl::string_view self_id, OnSignalingMessageCallback message_callback,
OnSignalingCompleteCallback complete_callback) {
if (!enabled_) return;
RunOnMediumEnvironmentThread(
[this, self_id{std::string(self_id)},
message_callback{std::move(message_callback)},
complete_callback{std::move(complete_callback)}]() {
webrtc_signaling_message_callback_[self_id] =
std::move(message_callback);
webrtc_signaling_complete_callback_[self_id] =
std::move(complete_callback);
NEARBY_LOG(INFO, "Registered signaling message callback for id = %s",
self_id.c_str());
});
RunOnMediumEnvironmentThread([this, self_id{std::string(self_id)},
message_callback{std::move(message_callback)},
complete_callback{
std::move(complete_callback)}]() {
webrtc_signaling_message_callback_[self_id] = std::move(message_callback);
webrtc_signaling_complete_callback_[self_id] = std::move(complete_callback);
NEARBY_LOG(INFO, "Registered signaling message callback for id = %s",
self_id.c_str());
});
}
void MediumEnvironment::UnregisterWebRtcSignalingMessenger(
+2 -2
View File
@@ -17,6 +17,8 @@
#include <atomic>
#include "absl/container/flat_hash_map.h"
#include "absl/strings/string_view.h"
#include "platform/api/bluetooth_adapter.h"
#include "platform/api/bluetooth_classic.h"
#include "platform/api/webrtc.h"
@@ -25,8 +27,6 @@
#include "platform/base/listeners.h"
#include "platform/base/nsd_service_info.h"
#include "platform/public/single_thread_executor.h"
#include "absl/container/flat_hash_map.h"
#include "absl/strings/string_view.h"
namespace location {
namespace nearby {
+2 -6
View File
@@ -79,13 +79,9 @@ TEST(PrngTest, ValidateLowerHalfOfInt64) {
ValidateRandom(TestMode::kLowerHalfOfInt64);
}
TEST(PrngTest, ValidateInt32) {
ValidateRandom(TestMode::kInt32);
}
TEST(PrngTest, ValidateInt32) { ValidateRandom(TestMode::kInt32); }
TEST(PrngTest, ValidateUint32) {
ValidateRandom(TestMode::kUint32);
}
TEST(PrngTest, ValidateUint32) { ValidateRandom(TestMode::kUint32); }
} // namespace nearby
} // namespace location